author | Daniel Lertpratchya <nikkipui@gmail.com> |
Thu, 12 Dec 2013 12:04:31 -0500 | |
changeset 10507 | 2081aa152526 |
parent 10483 | e3a02ed14587 |
child 10883 | d919e7194e23 |
permissions | -rw-r--r-- |
7385
10beb0e53130
standardize emacs c++ mode comments
Vedran Miletić <rivanvx@gmail.com>
parents:
7333
diff
changeset
|
1 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
2 |
/* |
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
3 |
* Copyright (c) 2005, 2006 INRIA |
5956
e9918be47f78
MacLow now buffers QoS MPDUs under Block Ack
Mirko Banchi <mk.banchi@gmail.com>
parents:
5955
diff
changeset
|
4 |
* Copyright (c) 2009 MIRKO BANCHI |
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
5 |
* |
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
6 |
* This program is free software; you can redistribute it and/or modify |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
7 |
* it under the terms of the GNU General Public License version 2 as |
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
8 |
* published by the Free Software Foundation; |
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
9 |
* |
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
10 |
* This program is distributed in the hope that it will be useful, |
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
13 |
* GNU General Public License for more details. |
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
14 |
* |
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License |
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
16 |
* along with this program; if not, write to the Free Software |
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
17 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
18 |
* |
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
19 |
* Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr> |
5956
e9918be47f78
MacLow now buffers QoS MPDUs under Block Ack
Mirko Banchi <mk.banchi@gmail.com>
parents:
5955
diff
changeset
|
20 |
* Author: Mirko Banchi <mk.banchi@gmail.com> |
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
21 |
*/ |
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
22 |
#ifndef MAC_LOW_H |
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
23 |
#define MAC_LOW_H |
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
24 |
|
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
25 |
#include <vector> |
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
26 |
#include <stdint.h> |
2985
fa0747c4ad5e
use function logging macros
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2530
diff
changeset
|
27 |
#include <ostream> |
5956
e9918be47f78
MacLow now buffers QoS MPDUs under Block Ack
Mirko Banchi <mk.banchi@gmail.com>
parents:
5955
diff
changeset
|
28 |
#include <map> |
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
29 |
|
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
30 |
#include "wifi-mac-header.h" |
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
31 |
#include "wifi-mode.h" |
1964
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1922
diff
changeset
|
32 |
#include "wifi-preamble.h" |
2524
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2508
diff
changeset
|
33 |
#include "wifi-remote-station-manager.h" |
5955
10fbe045901e
add support for block ack in MacLowTransmissionListener
Mirko Banchi <mk.banchi@gmail.com>
parents:
5954
diff
changeset
|
34 |
#include "ctrl-headers.h" |
5956
e9918be47f78
MacLow now buffers QoS MPDUs under Block Ack
Mirko Banchi <mk.banchi@gmail.com>
parents:
5955
diff
changeset
|
35 |
#include "mgt-headers.h" |
e9918be47f78
MacLow now buffers QoS MPDUs under Block Ack
Mirko Banchi <mk.banchi@gmail.com>
parents:
5955
diff
changeset
|
36 |
#include "block-ack-agreement.h" |
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
37 |
#include "ns3/mac48-address.h" |
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
38 |
#include "ns3/callback.h" |
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
39 |
#include "ns3/event-id.h" |
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
40 |
#include "ns3/packet.h" |
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
41 |
#include "ns3/nstime.h" |
5964
8a59a619c30e
add support to block ack tear down in MacLow
Mirko Banchi <mk.banchi@gmail.com>
parents:
5958
diff
changeset
|
42 |
#include "qos-utils.h" |
6606
2f2b67218332
Bug 981: use a cache to keep track of received MPDUs under block ack
Mirko Banchi <mk.banchi@gmail.com>
parents:
6599
diff
changeset
|
43 |
#include "block-ack-cache.h" |
10139 | 44 |
#include "wifi-tx-vector.h" |
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
45 |
|
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
46 |
namespace ns3 { |
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
47 |
|
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
48 |
class WifiPhy; |
2524
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2508
diff
changeset
|
49 |
class WifiMac; |
5964
8a59a619c30e
add support to block ack tear down in MacLow
Mirko Banchi <mk.banchi@gmail.com>
parents:
5958
diff
changeset
|
50 |
class EdcaTxopN; |
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
51 |
|
2059 | 52 |
/** |
7139
79dd02ed46ec
doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents:
6852
diff
changeset
|
53 |
* \ingroup wifi |
2059 | 54 |
* \brief listen to events coming from ns3::MacLow. |
55 |
*/ |
|
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
56 |
class MacLowTransmissionListener |
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
57 |
{ |
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
58 |
public: |
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
59 |
MacLowTransmissionListener (); |
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
60 |
virtual ~MacLowTransmissionListener (); |
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
61 |
|
2059 | 62 |
/** |
63 |
* \param snr the snr of the cts |
|
64 |
* \param txMode the txMode of the cts |
|
65 |
* |
|
66 |
* ns3::MacLow received an expected CTS within |
|
67 |
* CtsTimeout. |
|
68 |
*/ |
|
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
69 |
virtual void GotCts (double snr, WifiMode txMode) = 0; |
2059 | 70 |
/** |
71 |
* ns3::MacLow did not receive an expected CTS |
|
72 |
* within CtsTimeout. |
|
73 |
*/ |
|
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
74 |
virtual void MissedCts (void) = 0; |
2059 | 75 |
/** |
76 |
* \param snr the snr of the ack |
|
77 |
* \param txMode the transmission mode of the ack |
|
78 |
* |
|
79 |
* ns3::MacLow received an expected ACL within |
|
80 |
* AckTimeout. The <i>snr</i> and <i>txMode</i> |
|
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
81 |
* arguments are not valid when SUPER_FAST_ACK is |
2059 | 82 |
* used. |
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
83 |
*/ |
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
84 |
virtual void GotAck (double snr, WifiMode txMode) = 0; |
2059 | 85 |
/** |
86 |
* ns3::MacLow did not receive an expected ACK within |
|
87 |
* AckTimeout. |
|
88 |
*/ |
|
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
89 |
virtual void MissedAck (void) = 0; |
2059 | 90 |
/** |
5955
10fbe045901e
add support for block ack in MacLowTransmissionListener
Mirko Banchi <mk.banchi@gmail.com>
parents:
5954
diff
changeset
|
91 |
* \param blockAck Block ack response header |
10fbe045901e
add support for block ack in MacLowTransmissionListener
Mirko Banchi <mk.banchi@gmail.com>
parents:
5954
diff
changeset
|
92 |
* \param source Address of block ack sender |
10fbe045901e
add support for block ack in MacLowTransmissionListener
Mirko Banchi <mk.banchi@gmail.com>
parents:
5954
diff
changeset
|
93 |
* |
10fbe045901e
add support for block ack in MacLowTransmissionListener
Mirko Banchi <mk.banchi@gmail.com>
parents:
5954
diff
changeset
|
94 |
* Invoked when ns3::MacLow receives a block ack frame. |
10fbe045901e
add support for block ack in MacLowTransmissionListener
Mirko Banchi <mk.banchi@gmail.com>
parents:
5954
diff
changeset
|
95 |
* Block ack frame is received after a block ack request |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
96 |
* and contains information about the correct reception |
5955
10fbe045901e
add support for block ack in MacLowTransmissionListener
Mirko Banchi <mk.banchi@gmail.com>
parents:
5954
diff
changeset
|
97 |
* of a set of packet for which a normal ack wasn't send. |
10fbe045901e
add support for block ack in MacLowTransmissionListener
Mirko Banchi <mk.banchi@gmail.com>
parents:
5954
diff
changeset
|
98 |
* Default implementation for this method is empty. Every |
10fbe045901e
add support for block ack in MacLowTransmissionListener
Mirko Banchi <mk.banchi@gmail.com>
parents:
5954
diff
changeset
|
99 |
* queue that intends to be notified by MacLow of reception |
10fbe045901e
add support for block ack in MacLowTransmissionListener
Mirko Banchi <mk.banchi@gmail.com>
parents:
5954
diff
changeset
|
100 |
* of a block ack must redefine this function. |
10fbe045901e
add support for block ack in MacLowTransmissionListener
Mirko Banchi <mk.banchi@gmail.com>
parents:
5954
diff
changeset
|
101 |
*/ |
10fbe045901e
add support for block ack in MacLowTransmissionListener
Mirko Banchi <mk.banchi@gmail.com>
parents:
5954
diff
changeset
|
102 |
virtual void GotBlockAck (const CtrlBAckResponseHeader *blockAck, Mac48Address source); |
10fbe045901e
add support for block ack in MacLowTransmissionListener
Mirko Banchi <mk.banchi@gmail.com>
parents:
5954
diff
changeset
|
103 |
/** |
5958 | 104 |
* ns3::MacLow did not receive an expected BLOCK_ACK within |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
105 |
* BlockAckTimeout. This method is used only for immediate |
5958 | 106 |
* block ack variant. With delayed block ack, the MissedAck method will be |
107 |
* called instead: upon receipt of a block ack request, the rx station will |
|
108 |
* reply with a normal ack frame. Later, when the rx station gets a txop, it |
|
109 |
* will send the block ack back to the tx station which will reply with a |
|
110 |
* normal ack to the rx station. |
|
111 |
*/ |
|
112 |
virtual void MissedBlockAck (void); |
|
113 |
/** |
|
2059 | 114 |
* Invoked when ns3::MacLow wants to start a new transmission |
115 |
* as configured by MacLowTransmissionParameters::EnableNextData. |
|
116 |
* The listener is expected to call again MacLow::StartTransmission |
|
117 |
* with the "next" data to send. |
|
118 |
*/ |
|
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
119 |
virtual void StartNext (void) = 0; |
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
120 |
|
2059 | 121 |
/** |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
122 |
* Invoked if this transmission was canceled |
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
123 |
* one way or another. When this method is invoked, |
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
124 |
* you can assume that the packet has not been passed |
2059 | 125 |
* down the stack to the PHY. |
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
126 |
*/ |
9176
41ab1e874804
Bug 555 - DCF immediate access fix
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7385
diff
changeset
|
127 |
virtual void Cancel (void) = 0; |
41ab1e874804
Bug 555 - DCF immediate access fix
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7385
diff
changeset
|
128 |
|
41ab1e874804
Bug 555 - DCF immediate access fix
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7385
diff
changeset
|
129 |
/** |
41ab1e874804
Bug 555 - DCF immediate access fix
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7385
diff
changeset
|
130 |
* Invoked upon the end of the transmission of a frame that does not |
41ab1e874804
Bug 555 - DCF immediate access fix
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7385
diff
changeset
|
131 |
* require an ACK (e.g., broadcast and multicast frames). |
41ab1e874804
Bug 555 - DCF immediate access fix
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7385
diff
changeset
|
132 |
* |
41ab1e874804
Bug 555 - DCF immediate access fix
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7385
diff
changeset
|
133 |
*/ |
41ab1e874804
Bug 555 - DCF immediate access fix
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7385
diff
changeset
|
134 |
virtual void EndTxNoAck (void) = 0; |
41ab1e874804
Bug 555 - DCF immediate access fix
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7385
diff
changeset
|
135 |
|
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
136 |
}; |
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
137 |
|
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
138 |
|
2059 | 139 |
/** |
140 |
* \brief listen to NAV events |
|
7139
79dd02ed46ec
doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents:
6852
diff
changeset
|
141 |
* \ingroup wifi |
2059 | 142 |
* |
143 |
* This class is typically connected to an instance of ns3::Dcf |
|
144 |
* and calls to its methods are forwards to the corresponding |
|
145 |
* ns3::Dcf methods. |
|
146 |
*/ |
|
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
147 |
class MacLowDcfListener |
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
148 |
{ |
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
149 |
public: |
4509
b2654e0f071d
bug 556: DcfManager does not handle AckTimeout properly when there are multiple queues
Kirill V. Andreev <kirillano@yandex.ru>
parents:
3906
diff
changeset
|
150 |
MacLowDcfListener (); |
b2654e0f071d
bug 556: DcfManager does not handle AckTimeout properly when there are multiple queues
Kirill V. Andreev <kirillano@yandex.ru>
parents:
3906
diff
changeset
|
151 |
virtual ~MacLowDcfListener (); |
2059 | 152 |
/** |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
153 |
* Norify that NAV has started for the given duration. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
154 |
* |
2059 | 155 |
* \param duration duration of NAV timer |
156 |
*/ |
|
2146
40ad60ac9912
replace Dcf with DcfManager
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2059
diff
changeset
|
157 |
virtual void NavStart (Time duration) = 0; |
2059 | 158 |
/** |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
159 |
* Notify that NAV has resetted. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
160 |
* |
2059 | 161 |
* \param duration duration of NAV timer |
162 |
*/ |
|
2146
40ad60ac9912
replace Dcf with DcfManager
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2059
diff
changeset
|
163 |
virtual void NavReset (Time duration) = 0; |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
164 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
165 |
* Notify that ACK timeout has started for a given duration. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
166 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
167 |
* \param duration duration of ACK timeout |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
168 |
*/ |
4509
b2654e0f071d
bug 556: DcfManager does not handle AckTimeout properly when there are multiple queues
Kirill V. Andreev <kirillano@yandex.ru>
parents:
3906
diff
changeset
|
169 |
virtual void AckTimeoutStart (Time duration) = 0; |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
170 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
171 |
* Notify that ACK timeout has resetted. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
172 |
*/ |
4509
b2654e0f071d
bug 556: DcfManager does not handle AckTimeout properly when there are multiple queues
Kirill V. Andreev <kirillano@yandex.ru>
parents:
3906
diff
changeset
|
173 |
virtual void AckTimeoutReset () = 0; |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
174 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
175 |
* Notify that CTS timeout has started for a given duration. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
176 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
177 |
* \param duration duration of CTS timeout |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
178 |
*/ |
4509
b2654e0f071d
bug 556: DcfManager does not handle AckTimeout properly when there are multiple queues
Kirill V. Andreev <kirillano@yandex.ru>
parents:
3906
diff
changeset
|
179 |
virtual void CtsTimeoutStart (Time duration) = 0; |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
180 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
181 |
* Notify that CTS timeout has resetted. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
182 |
*/ |
4509
b2654e0f071d
bug 556: DcfManager does not handle AckTimeout properly when there are multiple queues
Kirill V. Andreev <kirillano@yandex.ru>
parents:
3906
diff
changeset
|
183 |
virtual void CtsTimeoutReset () = 0; |
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
184 |
}; |
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
185 |
|
2059 | 186 |
/** |
7139
79dd02ed46ec
doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents:
6852
diff
changeset
|
187 |
* \ingroup wifi |
5964
8a59a619c30e
add support to block ack tear down in MacLow
Mirko Banchi <mk.banchi@gmail.com>
parents:
5958
diff
changeset
|
188 |
* \brief listen for block ack events. |
8a59a619c30e
add support to block ack tear down in MacLow
Mirko Banchi <mk.banchi@gmail.com>
parents:
5958
diff
changeset
|
189 |
*/ |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
190 |
class MacLowBlockAckEventListener |
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
191 |
{ |
5964
8a59a619c30e
add support to block ack tear down in MacLow
Mirko Banchi <mk.banchi@gmail.com>
parents:
5958
diff
changeset
|
192 |
public: |
8a59a619c30e
add support to block ack tear down in MacLow
Mirko Banchi <mk.banchi@gmail.com>
parents:
5958
diff
changeset
|
193 |
MacLowBlockAckEventListener (); |
8a59a619c30e
add support to block ack tear down in MacLow
Mirko Banchi <mk.banchi@gmail.com>
parents:
5958
diff
changeset
|
194 |
virtual ~MacLowBlockAckEventListener (); |
8a59a619c30e
add support to block ack tear down in MacLow
Mirko Banchi <mk.banchi@gmail.com>
parents:
5958
diff
changeset
|
195 |
/** |
8a59a619c30e
add support to block ack tear down in MacLow
Mirko Banchi <mk.banchi@gmail.com>
parents:
5958
diff
changeset
|
196 |
* Typically is called in order to notify EdcaTxopN that a block ack inactivity |
8a59a619c30e
add support to block ack tear down in MacLow
Mirko Banchi <mk.banchi@gmail.com>
parents:
5958
diff
changeset
|
197 |
* timeout occurs for the block ack agreement identified by the pair <i>originator</i>, <i>tid</i>. |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
198 |
* |
5964
8a59a619c30e
add support to block ack tear down in MacLow
Mirko Banchi <mk.banchi@gmail.com>
parents:
5958
diff
changeset
|
199 |
* Rx station maintains an inactivity timer for each block ack |
8a59a619c30e
add support to block ack tear down in MacLow
Mirko Banchi <mk.banchi@gmail.com>
parents:
5958
diff
changeset
|
200 |
* agreement. Timer is reset when a frame with ack policy block ack |
8a59a619c30e
add support to block ack tear down in MacLow
Mirko Banchi <mk.banchi@gmail.com>
parents:
5958
diff
changeset
|
201 |
* or a block ack request are received. When this timer reaches zero |
8a59a619c30e
add support to block ack tear down in MacLow
Mirko Banchi <mk.banchi@gmail.com>
parents:
5958
diff
changeset
|
202 |
* this method is called and a delba frame is scheduled for transmission. |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
203 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
204 |
* \param originator MAC address of the data originator |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
205 |
* \param tid |
5964
8a59a619c30e
add support to block ack tear down in MacLow
Mirko Banchi <mk.banchi@gmail.com>
parents:
5958
diff
changeset
|
206 |
*/ |
8a59a619c30e
add support to block ack tear down in MacLow
Mirko Banchi <mk.banchi@gmail.com>
parents:
5958
diff
changeset
|
207 |
virtual void BlockAckInactivityTimeout (Mac48Address originator, uint8_t tid) = 0; |
8a59a619c30e
add support to block ack tear down in MacLow
Mirko Banchi <mk.banchi@gmail.com>
parents:
5958
diff
changeset
|
208 |
}; |
8a59a619c30e
add support to block ack tear down in MacLow
Mirko Banchi <mk.banchi@gmail.com>
parents:
5958
diff
changeset
|
209 |
|
8a59a619c30e
add support to block ack tear down in MacLow
Mirko Banchi <mk.banchi@gmail.com>
parents:
5958
diff
changeset
|
210 |
/** |
2059 | 211 |
* \brief control how a packet is transmitted. |
7139
79dd02ed46ec
doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents:
6852
diff
changeset
|
212 |
* \ingroup wifi |
2059 | 213 |
* |
214 |
* The ns3::MacLow::StartTransmission method expects |
|
215 |
* an instance of this class to describe how the packet |
|
216 |
* should be transmitted. |
|
217 |
*/ |
|
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
218 |
class MacLowTransmissionParameters |
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
219 |
{ |
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
220 |
public: |
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
221 |
MacLowTransmissionParameters (); |
6595
3289a9d91620
run check-style on mac-low.h/cc
Mirko Banchi <mk.banchi@gmail.com>
parents:
6331
diff
changeset
|
222 |
|
2059 | 223 |
/** |
224 |
* Wait ACKTimeout for an ACK. If we get an ACK |
|
225 |
* on time, call MacLowTransmissionListener::GotAck. |
|
226 |
* Call MacLowTransmissionListener::MissedAck otherwise. |
|
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
227 |
*/ |
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
228 |
void EnableAck (void); |
2059 | 229 |
/** |
230 |
* - wait PIFS after end-of-tx. If idle, call |
|
231 |
* MacLowTransmissionListener::MissedAck. |
|
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
232 |
* - if busy at end-of-tx+PIFS, wait end-of-rx |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
233 |
* - if Ack ok at end-of-rx, call |
2059 | 234 |
* MacLowTransmissionListener::GotAck. |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
235 |
* - if Ack not ok at end-of-rx, report call |
2059 | 236 |
* MacLowTransmissionListener::MissedAck |
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
237 |
* at end-of-rx+SIFS. |
2059 | 238 |
* |
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
239 |
* This is really complicated but it is needed for |
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
240 |
* proper HCCA support. |
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
241 |
*/ |
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
242 |
void EnableFastAck (void); |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
243 |
/** |
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
244 |
* - if busy at end-of-tx+PIFS, call |
2059 | 245 |
* MacLowTransmissionListener::GotAck |
246 |
* - if idle at end-of-tx+PIFS, call |
|
247 |
* MacLowTransmissionListener::MissedAck |
|
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
248 |
*/ |
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
249 |
void EnableSuperFastAck (void); |
2059 | 250 |
/** |
5954
2b9e06875b69
add support for block ack in MacLowTransmissionParameters
Mirko Banchi <mk.banchi@gmail.com>
parents:
5819
diff
changeset
|
251 |
* Wait BASICBLOCKACKTimeout for a Basic Block Ack Response frame. |
2b9e06875b69
add support for block ack in MacLowTransmissionParameters
Mirko Banchi <mk.banchi@gmail.com>
parents:
5819
diff
changeset
|
252 |
*/ |
2b9e06875b69
add support for block ack in MacLowTransmissionParameters
Mirko Banchi <mk.banchi@gmail.com>
parents:
5819
diff
changeset
|
253 |
void EnableBasicBlockAck (void); |
2b9e06875b69
add support for block ack in MacLowTransmissionParameters
Mirko Banchi <mk.banchi@gmail.com>
parents:
5819
diff
changeset
|
254 |
/** |
2b9e06875b69
add support for block ack in MacLowTransmissionParameters
Mirko Banchi <mk.banchi@gmail.com>
parents:
5819
diff
changeset
|
255 |
* Wait COMPRESSEDBLOCKACKTimeout for a Compressed Block Ack Response frame. |
2b9e06875b69
add support for block ack in MacLowTransmissionParameters
Mirko Banchi <mk.banchi@gmail.com>
parents:
5819
diff
changeset
|
256 |
*/ |
2b9e06875b69
add support for block ack in MacLowTransmissionParameters
Mirko Banchi <mk.banchi@gmail.com>
parents:
5819
diff
changeset
|
257 |
void EnableCompressedBlockAck (void); |
2b9e06875b69
add support for block ack in MacLowTransmissionParameters
Mirko Banchi <mk.banchi@gmail.com>
parents:
5819
diff
changeset
|
258 |
/** |
2b9e06875b69
add support for block ack in MacLowTransmissionParameters
Mirko Banchi <mk.banchi@gmail.com>
parents:
5819
diff
changeset
|
259 |
* NOT IMPLEMENTED FOR NOW |
2b9e06875b69
add support for block ack in MacLowTransmissionParameters
Mirko Banchi <mk.banchi@gmail.com>
parents:
5819
diff
changeset
|
260 |
*/ |
2b9e06875b69
add support for block ack in MacLowTransmissionParameters
Mirko Banchi <mk.banchi@gmail.com>
parents:
5819
diff
changeset
|
261 |
void EnableMultiTidBlockAck (void); |
2b9e06875b69
add support for block ack in MacLowTransmissionParameters
Mirko Banchi <mk.banchi@gmail.com>
parents:
5819
diff
changeset
|
262 |
/** |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
263 |
* Send a RTS, and wait CTSTimeout for a CTS. If we get a |
2059 | 264 |
* CTS on time, call MacLowTransmissionListener::GotCts |
265 |
* and send data. Otherwise, call MacLowTransmissionListener::MissedCts |
|
266 |
* and do not send data. |
|
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
267 |
*/ |
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
268 |
void EnableRts (void); |
2059 | 269 |
/** |
270 |
* \param size size of next data to send after current packet is |
|
271 |
* sent. |
|
272 |
* |
|
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
273 |
* Add the transmission duration of the next data to the |
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
274 |
* durationId of the outgoing packet and call |
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
275 |
* MacLowTransmissionListener::StartNext at the end of |
2059 | 276 |
* the current transmission + SIFS. |
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
277 |
*/ |
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
278 |
void EnableNextData (uint32_t size); |
6595
3289a9d91620
run check-style on mac-low.h/cc
Mirko Banchi <mk.banchi@gmail.com>
parents:
6331
diff
changeset
|
279 |
|
2059 | 280 |
/** |
281 |
* \param durationId the value to set in the duration/Id field of |
|
282 |
* the outgoing packet. |
|
283 |
* |
|
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
284 |
* Ignore all other durationId calculation and simply force the |
2059 | 285 |
* packet's durationId field to this value. |
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
286 |
*/ |
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
287 |
void EnableOverrideDurationId (Time durationId); |
6595
3289a9d91620
run check-style on mac-low.h/cc
Mirko Banchi <mk.banchi@gmail.com>
parents:
6331
diff
changeset
|
288 |
|
2059 | 289 |
/** |
290 |
* Do not wait for Ack after data transmission. Typically |
|
291 |
* used for Broadcast and multicast frames. |
|
292 |
*/ |
|
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
293 |
void DisableAck (void); |
2059 | 294 |
/** |
295 |
* Do not send rts and wait for cts before sending data. |
|
296 |
*/ |
|
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
297 |
void DisableRts (void); |
2059 | 298 |
/** |
299 |
* Do not attempt to send data burst after current transmission |
|
300 |
*/ |
|
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
301 |
void DisableNextData (void); |
2059 | 302 |
/** |
303 |
* Do not force the duration/id field of the packet: its |
|
304 |
* value is automatically calculated by the MacLow before |
|
305 |
* calling WifiPhy::Send. |
|
306 |
*/ |
|
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
307 |
void DisableOverrideDurationId (void); |
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
308 |
|
2059 | 309 |
/** |
310 |
* \returns true if must wait for ACK after data transmission, |
|
311 |
* false otherwise. |
|
312 |
* |
|
313 |
* This methods returns true when any of MustWaitNormalAck, |
|
314 |
* MustWaitFastAck, or MustWaitSuperFastAck return true. |
|
315 |
*/ |
|
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
316 |
bool MustWaitAck (void) const; |
2059 | 317 |
/** |
318 |
* \returns true if normal ACK protocol should be used, false |
|
319 |
* otherwise. |
|
320 |
* |
|
321 |
* \sa EnableAck |
|
322 |
*/ |
|
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
323 |
bool MustWaitNormalAck (void) const; |
2059 | 324 |
/** |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
325 |
* \returns true if fast ack protocol should be used, false |
2059 | 326 |
* otherwise. |
327 |
* |
|
328 |
* \sa EnableFastAck |
|
329 |
*/ |
|
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
330 |
bool MustWaitFastAck (void) const; |
2059 | 331 |
/** |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
332 |
* \returns true if super fast ack protocol should be used, false |
2059 | 333 |
* otherwise. |
334 |
* |
|
335 |
* \sa EnableSuperFastAck |
|
336 |
*/ |
|
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
337 |
bool MustWaitSuperFastAck (void) const; |
2059 | 338 |
/** |
5954
2b9e06875b69
add support for block ack in MacLowTransmissionParameters
Mirko Banchi <mk.banchi@gmail.com>
parents:
5819
diff
changeset
|
339 |
* \returns true if block ack mechanism is used, false otherwise. |
2b9e06875b69
add support for block ack in MacLowTransmissionParameters
Mirko Banchi <mk.banchi@gmail.com>
parents:
5819
diff
changeset
|
340 |
* |
2b9e06875b69
add support for block ack in MacLowTransmissionParameters
Mirko Banchi <mk.banchi@gmail.com>
parents:
5819
diff
changeset
|
341 |
* \sa EnableBlockAck |
2b9e06875b69
add support for block ack in MacLowTransmissionParameters
Mirko Banchi <mk.banchi@gmail.com>
parents:
5819
diff
changeset
|
342 |
*/ |
2b9e06875b69
add support for block ack in MacLowTransmissionParameters
Mirko Banchi <mk.banchi@gmail.com>
parents:
5819
diff
changeset
|
343 |
bool MustWaitBasicBlockAck (void) const; |
2b9e06875b69
add support for block ack in MacLowTransmissionParameters
Mirko Banchi <mk.banchi@gmail.com>
parents:
5819
diff
changeset
|
344 |
/** |
2b9e06875b69
add support for block ack in MacLowTransmissionParameters
Mirko Banchi <mk.banchi@gmail.com>
parents:
5819
diff
changeset
|
345 |
* \returns true if compressed block ack mechanism is used, false otherwise. |
2b9e06875b69
add support for block ack in MacLowTransmissionParameters
Mirko Banchi <mk.banchi@gmail.com>
parents:
5819
diff
changeset
|
346 |
* |
2b9e06875b69
add support for block ack in MacLowTransmissionParameters
Mirko Banchi <mk.banchi@gmail.com>
parents:
5819
diff
changeset
|
347 |
* \sa EnableCompressedBlockAck |
2b9e06875b69
add support for block ack in MacLowTransmissionParameters
Mirko Banchi <mk.banchi@gmail.com>
parents:
5819
diff
changeset
|
348 |
*/ |
2b9e06875b69
add support for block ack in MacLowTransmissionParameters
Mirko Banchi <mk.banchi@gmail.com>
parents:
5819
diff
changeset
|
349 |
bool MustWaitCompressedBlockAck (void) const; |
2b9e06875b69
add support for block ack in MacLowTransmissionParameters
Mirko Banchi <mk.banchi@gmail.com>
parents:
5819
diff
changeset
|
350 |
/** |
2b9e06875b69
add support for block ack in MacLowTransmissionParameters
Mirko Banchi <mk.banchi@gmail.com>
parents:
5819
diff
changeset
|
351 |
* \returns true if multi-tid block ack mechanism is used, false otherwise. |
2b9e06875b69
add support for block ack in MacLowTransmissionParameters
Mirko Banchi <mk.banchi@gmail.com>
parents:
5819
diff
changeset
|
352 |
* |
2b9e06875b69
add support for block ack in MacLowTransmissionParameters
Mirko Banchi <mk.banchi@gmail.com>
parents:
5819
diff
changeset
|
353 |
* \sa EnableMultiTidBlockAck |
2b9e06875b69
add support for block ack in MacLowTransmissionParameters
Mirko Banchi <mk.banchi@gmail.com>
parents:
5819
diff
changeset
|
354 |
*/ |
2b9e06875b69
add support for block ack in MacLowTransmissionParameters
Mirko Banchi <mk.banchi@gmail.com>
parents:
5819
diff
changeset
|
355 |
bool MustWaitMultiTidBlockAck (void) const; |
2b9e06875b69
add support for block ack in MacLowTransmissionParameters
Mirko Banchi <mk.banchi@gmail.com>
parents:
5819
diff
changeset
|
356 |
/** |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
357 |
* \returns true if RTS should be sent and CTS waited for before |
2059 | 358 |
* sending data, false otherwise. |
359 |
*/ |
|
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
360 |
bool MustSendRts (void) const; |
2059 | 361 |
/** |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
362 |
* \returns true if a duration/id was forced with |
2059 | 363 |
* EnableOverrideDurationId, false otherwise. |
364 |
*/ |
|
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
365 |
bool HasDurationId (void) const; |
2059 | 366 |
/** |
367 |
* \returns the duration/id forced by EnableOverrideDurationId |
|
368 |
*/ |
|
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
369 |
Time GetDurationId (void) const; |
2059 | 370 |
/** |
371 |
* \returns true if EnableNextData was called, false otherwise. |
|
372 |
*/ |
|
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
373 |
bool HasNextPacket (void) const; |
2059 | 374 |
/** |
375 |
* \returns the size specified by EnableNextData. |
|
376 |
*/ |
|
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
377 |
uint32_t GetNextPacketSize (void) const; |
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
378 |
|
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
379 |
private: |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
380 |
|
2985
fa0747c4ad5e
use function logging macros
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2530
diff
changeset
|
381 |
friend std::ostream &operator << (std::ostream &os, const MacLowTransmissionParameters ¶ms); |
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
382 |
uint32_t m_nextSize; |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
383 |
enum |
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
384 |
{ |
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
385 |
ACK_NONE, |
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
386 |
ACK_NORMAL, |
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
387 |
ACK_FAST, |
5954
2b9e06875b69
add support for block ack in MacLowTransmissionParameters
Mirko Banchi <mk.banchi@gmail.com>
parents:
5819
diff
changeset
|
388 |
ACK_SUPER_FAST, |
2b9e06875b69
add support for block ack in MacLowTransmissionParameters
Mirko Banchi <mk.banchi@gmail.com>
parents:
5819
diff
changeset
|
389 |
BLOCK_ACK_BASIC, |
2b9e06875b69
add support for block ack in MacLowTransmissionParameters
Mirko Banchi <mk.banchi@gmail.com>
parents:
5819
diff
changeset
|
390 |
BLOCK_ACK_COMPRESSED, |
2b9e06875b69
add support for block ack in MacLowTransmissionParameters
Mirko Banchi <mk.banchi@gmail.com>
parents:
5819
diff
changeset
|
391 |
BLOCK_ACK_MULTI_TID |
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
392 |
} m_waitAck; |
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
393 |
bool m_sendRts; |
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
394 |
Time m_overrideDurationId; |
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
395 |
}; |
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
396 |
|
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
397 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
398 |
* Serialize MacLowTransmissionParameters to ostream in a human-readable form. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
399 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
400 |
* \param os std::ostream |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
401 |
* \param params MacLowTransmissionParameters |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
402 |
* \return std::ostream |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
403 |
*/ |
2985
fa0747c4ad5e
use function logging macros
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2530
diff
changeset
|
404 |
std::ostream &operator << (std::ostream &os, const MacLowTransmissionParameters ¶ms); |
fa0747c4ad5e
use function logging macros
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2530
diff
changeset
|
405 |
|
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
406 |
|
2059 | 407 |
/** |
7139
79dd02ed46ec
doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents:
6852
diff
changeset
|
408 |
* \ingroup wifi |
2059 | 409 |
* \brief handle RTS/CTS/DATA/ACK transactions. |
410 |
*/ |
|
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
411 |
class MacLow : public Object |
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
412 |
{ |
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
413 |
public: |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
414 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
415 |
* typedef for a callback for MacLowRx |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
416 |
*/ |
5819
514ec98954ab
Wifi code cleanup: Correcting various const keyword ordering and removing superfluous (boolean)?true:false.
Timo Bingmann <tbns@idlebox.net>
parents:
5192
diff
changeset
|
417 |
typedef Callback<void, Ptr<Packet>, const WifiMacHeader*> MacLowRxCallback; |
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
418 |
|
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
419 |
MacLow (); |
2350
0b54480c4fd1
Hook trace sources into the trace system. Add WifiTrace to give a 'simple' API to tracing wifi-specific sources.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2290
diff
changeset
|
420 |
virtual ~MacLow (); |
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
421 |
|
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
422 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
423 |
* Set up WifiPhy associated with this MacLow. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
424 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
425 |
* \param phy WifiPhy associated with this MacLow |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
426 |
*/ |
2054
ba8e810bae4c
derive WifiPhy from Object and manage it with a Ptr<>
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2022
diff
changeset
|
427 |
void SetPhy (Ptr<WifiPhy> phy); |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
428 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
429 |
* Set up WifiRemoteStationManager associated with this MacLow. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
430 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
431 |
* \param manager WifiRemoteStationManager associated with this MacLow |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
432 |
*/ |
2524
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2508
diff
changeset
|
433 |
void SetWifiRemoteStationManager (Ptr<WifiRemoteStationManager> manager); |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2508
diff
changeset
|
434 |
|
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
435 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
436 |
* Set MAC address of this MacLow. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
437 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
438 |
* \param ad Mac48Address of this MacLow |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
439 |
*/ |
3596
6c39b712a535
move Address and ack timeout down to MacLow
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2985
diff
changeset
|
440 |
void SetAddress (Mac48Address ad); |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
441 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
442 |
* Set ACK timeout of this MacLow. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
443 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
444 |
* \param ackTimeout ACK timeout of this MacLow |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
445 |
*/ |
3596
6c39b712a535
move Address and ack timeout down to MacLow
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2985
diff
changeset
|
446 |
void SetAckTimeout (Time ackTimeout); |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
447 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
448 |
* Set Basic Block ACK timeout of this MacLow. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
449 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
450 |
* \param blockAckTimeout Basic Block ACK timeout of this MacLow |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
451 |
*/ |
5958 | 452 |
void SetBasicBlockAckTimeout (Time blockAckTimeout); |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
453 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
454 |
* Set Compressed Block ACK timeout of this MacLow. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
455 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
456 |
* \param blockAckTimeout Compressed Block ACK timeout of this MacLow |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
457 |
*/ |
5958 | 458 |
void SetCompressedBlockAckTimeout (Time blockAckTimeout); |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
459 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
460 |
* Enable or disable CTS-to-self capability. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
461 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
462 |
* \param enable Enable or disable CTS-to-self capability |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
463 |
*/ |
10139 | 464 |
void SetCtsToSelfSupported (bool enable); |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
465 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
466 |
* Set CTS timeout of this MacLow. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
467 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
468 |
* \param ctsTimeout CTS timeout of this MacLow |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
469 |
*/ |
3597
fe35e5be4b78
move cts timeout down to MacLow
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3596
diff
changeset
|
470 |
void SetCtsTimeout (Time ctsTimeout); |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
471 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
472 |
* Set Short Interframe Space (SIFS) of this MacLow. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
473 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
474 |
* \param sifs SIFS of this MacLow |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
475 |
*/ |
3598
7b209b3b6af2
move sifs down to MacLow
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3597
diff
changeset
|
476 |
void SetSifs (Time sifs); |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
477 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
478 |
* Set Reduced Interframe Space (RIFS) of this MacLow. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
479 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
480 |
* \param rifs RIFS of this MacLow |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
481 |
*/ |
10139 | 482 |
void SetRifs (Time rifs); |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
483 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
484 |
* Set slot duration of this MacLow. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
485 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
486 |
* \param slotTime slot duration of this MacLow |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
487 |
*/ |
3599
721bd46c15f8
move slot and pifs down to MacLow
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3598
diff
changeset
|
488 |
void SetSlotTime (Time slotTime); |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
489 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
490 |
* Set PCF Interframe Space (PIFS) of this MacLow. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
491 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
492 |
* \param pifs PIFS of this MacLow |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
493 |
*/ |
3599
721bd46c15f8
move slot and pifs down to MacLow
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3598
diff
changeset
|
494 |
void SetPifs (Time pifs); |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
495 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
496 |
* Set the Basic Service Set Identification. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
497 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
498 |
* \param ad the BSSID |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
499 |
*/ |
3600
5888dfe3f245
move GetBssid down to MacLow
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3599
diff
changeset
|
500 |
void SetBssid (Mac48Address ad); |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
501 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
502 |
* Enable promiscuous mode. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
503 |
*/ |
7333
17b50c5b062c
[Bug 827] promiscuous mode for wifi
Ruben Merz <ruben@net.t-labs.tu-berlin.de>
parents:
7141
diff
changeset
|
504 |
void SetPromisc (void); |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
505 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
506 |
* Return whether CTS-to-self capability is supported. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
507 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
508 |
* \return true if CTS-to-self is supported, false otherwise |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
509 |
*/ |
10139 | 510 |
bool GetCtsToSelfSupported () const; |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
511 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
512 |
* Return the MAC address of this MacLow. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
513 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
514 |
* \return Mac48Address of this MacLow |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
515 |
*/ |
3596
6c39b712a535
move Address and ack timeout down to MacLow
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2985
diff
changeset
|
516 |
Mac48Address GetAddress (void) const; |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
517 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
518 |
* Return ACK timeout of this MacLow. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
519 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
520 |
* \return ACK timeout |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
521 |
*/ |
3596
6c39b712a535
move Address and ack timeout down to MacLow
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2985
diff
changeset
|
522 |
Time GetAckTimeout (void) const; |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
523 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
524 |
* Return Basic Block ACK timeout of this MacLow. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
525 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
526 |
* \return Basic Block ACK timeout |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
527 |
*/ |
5958 | 528 |
Time GetBasicBlockAckTimeout () const; |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
529 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
530 |
* Return Compressed Block ACK timeout of this MacLow. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
531 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
532 |
* \return Compressed Block ACK timeout |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
533 |
*/ |
5958 | 534 |
Time GetCompressedBlockAckTimeout () const; |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
535 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
536 |
* Return CTS timeout of this MacLow. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
537 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
538 |
* \return CTS timeout |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
539 |
*/ |
3597
fe35e5be4b78
move cts timeout down to MacLow
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3596
diff
changeset
|
540 |
Time GetCtsTimeout (void) const; |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
541 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
542 |
* Return Short Interframe Space (SIFS) of this MacLow. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
543 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
544 |
* \return SIFS |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
545 |
*/ |
3598
7b209b3b6af2
move sifs down to MacLow
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3597
diff
changeset
|
546 |
Time GetSifs (void) const; |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
547 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
548 |
* Return slot duration of this MacLow. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
549 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
550 |
* \return slot duration |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
551 |
*/ |
3599
721bd46c15f8
move slot and pifs down to MacLow
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3598
diff
changeset
|
552 |
Time GetSlotTime (void) const; |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
553 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
554 |
* Return PCF Interframe Space (PIFS) of this MacLow. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
555 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
556 |
* \return PIFS |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
557 |
*/ |
3599
721bd46c15f8
move slot and pifs down to MacLow
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3598
diff
changeset
|
558 |
Time GetPifs (void) const; |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
559 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
560 |
* Return Reduced Interframe Space (RIFS) of this MacLow. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
561 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
562 |
* \return RIFS |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
563 |
*/ |
10139 | 564 |
Time GetRifs (void) const; |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
565 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
566 |
* Return the Basic Service Set Identification. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
567 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
568 |
* \return BSSID |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
569 |
*/ |
3600
5888dfe3f245
move GetBssid down to MacLow
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3599
diff
changeset
|
570 |
Mac48Address GetBssid (void) const; |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
571 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
572 |
* Check if MacLow is operating in promiscuous mode. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
573 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
574 |
* \return true if MacLow is operating in promiscuous mode, |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
575 |
* false otherwise |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
576 |
*/ |
10459
f2e90c12a44f
base implementation of the IEEE 802.11p standard
Junling Bu <linlinjavaer@gmail.com>
parents:
10202
diff
changeset
|
577 |
bool IsPromisc (void) const; |
3596
6c39b712a535
move Address and ack timeout down to MacLow
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2985
diff
changeset
|
578 |
|
2059 | 579 |
/** |
580 |
* \param callback the callback which receives every incoming packet. |
|
581 |
* |
|
582 |
* This callback typically forwards incoming packets to |
|
583 |
* an instance of ns3::MacRxMiddle. |
|
584 |
*/ |
|
2524
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2508
diff
changeset
|
585 |
void SetRxCallback (Callback<void,Ptr<Packet>,const WifiMacHeader *> callback); |
2059 | 586 |
/** |
587 |
* \param listener listen to NAV events for every incoming |
|
588 |
* and outgoing packet. |
|
589 |
*/ |
|
4509
b2654e0f071d
bug 556: DcfManager does not handle AckTimeout properly when there are multiple queues
Kirill V. Andreev <kirillano@yandex.ru>
parents:
3906
diff
changeset
|
590 |
void RegisterDcfListener (MacLowDcfListener *listener); |
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
591 |
|
2059 | 592 |
/** |
2290
081b4efd800c
fix doxygen warnings
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2289
diff
changeset
|
593 |
* \param packet to send (does not include the 802.11 MAC header and checksum) |
081b4efd800c
fix doxygen warnings
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2289
diff
changeset
|
594 |
* \param hdr header associated to the packet to send. |
2059 | 595 |
* \param parameters transmission parameters of packet. |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
596 |
* \return the transmission time that includes the time for the next packet transmission |
2059 | 597 |
* |
598 |
* This transmission time includes the time required for |
|
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
599 |
* the next packet transmission if one was selected. |
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
600 |
*/ |
2268
0e57ac711220
introduce a low latency parameter for rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2159
diff
changeset
|
601 |
Time CalculateTransmissionTime (Ptr<const Packet> packet, |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
602 |
const WifiMacHeader* hdr, |
5819
514ec98954ab
Wifi code cleanup: Correcting various const keyword ordering and removing superfluous (boolean)?true:false.
Timo Bingmann <tbns@idlebox.net>
parents:
5192
diff
changeset
|
603 |
const MacLowTransmissionParameters& parameters) const; |
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
604 |
|
2059 | 605 |
/** |
606 |
* \param packet packet to send |
|
607 |
* \param hdr 802.11 header for packet to send |
|
608 |
* \param parameters the transmission parameters to use for this packet. |
|
609 |
* \param listener listen to transmission events. |
|
610 |
* |
|
611 |
* Start the transmission of the input packet and notify the listener |
|
612 |
* of transmission events. |
|
613 |
*/ |
|
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
614 |
void StartTransmission (Ptr<const Packet> packet, |
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
615 |
const WifiMacHeader* hdr, |
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
616 |
MacLowTransmissionParameters parameters, |
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
617 |
MacLowTransmissionListener *listener); |
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
618 |
|
2059 | 619 |
/** |
620 |
* \param packet packet received |
|
621 |
* \param rxSnr snr of packet received |
|
622 |
* \param txMode transmission mode of packet received |
|
623 |
* \param preamble type of preamble used for the packet received |
|
624 |
* |
|
625 |
* This method is typically invoked by the lower PHY layer to notify |
|
626 |
* the MAC layer that a packet was successfully received. |
|
627 |
*/ |
|
2159
20f882e85b4a
port to Ptr<Packet> branch
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2146
diff
changeset
|
628 |
void ReceiveOk (Ptr<Packet> packet, double rxSnr, WifiMode txMode, WifiPreamble preamble); |
2059 | 629 |
/** |
630 |
* \param packet packet received. |
|
631 |
* \param rxSnr snr of packet received. |
|
632 |
* |
|
633 |
* This method is typically invoked by the lower PHY layer to notify |
|
634 |
* the MAC layer that a packet was unsuccessfully received. |
|
635 |
*/ |
|
3899 | 636 |
void ReceiveError (Ptr<const Packet> packet, double rxSnr); |
5189 | 637 |
/** |
638 |
* \param duration switching delay duration. |
|
639 |
* |
|
640 |
* This method is typically invoked by the PhyMacLowListener to notify |
|
5192 | 641 |
* the MAC layer that a channel switching occured. When a channel switching |
642 |
* occurs, pending MAC transmissions (RTS, CTS, DATA and ACK) are cancelled. |
|
5189 | 643 |
*/ |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
644 |
void NotifySwitchingStartNow (Time duration); |
5956
e9918be47f78
MacLow now buffers QoS MPDUs under Block Ack
Mirko Banchi <mk.banchi@gmail.com>
parents:
5955
diff
changeset
|
645 |
/** |
6673
ec22aa763e2d
Bug 978: Consolidate Wi-Fi MAC high functionality
Dean Armstrong <deanarm@gmail.com>
parents:
6606
diff
changeset
|
646 |
* \param respHdr Add block ack response from originator (action |
ec22aa763e2d
Bug 978: Consolidate Wi-Fi MAC high functionality
Dean Armstrong <deanarm@gmail.com>
parents:
6606
diff
changeset
|
647 |
* frame). |
ec22aa763e2d
Bug 978: Consolidate Wi-Fi MAC high functionality
Dean Armstrong <deanarm@gmail.com>
parents:
6606
diff
changeset
|
648 |
* \param originator Address of peer station involved in block ack |
ec22aa763e2d
Bug 978: Consolidate Wi-Fi MAC high functionality
Dean Armstrong <deanarm@gmail.com>
parents:
6606
diff
changeset
|
649 |
* mechanism. |
ec22aa763e2d
Bug 978: Consolidate Wi-Fi MAC high functionality
Dean Armstrong <deanarm@gmail.com>
parents:
6606
diff
changeset
|
650 |
* \param startingSeq Sequence number of the first MPDU of all |
ec22aa763e2d
Bug 978: Consolidate Wi-Fi MAC high functionality
Dean Armstrong <deanarm@gmail.com>
parents:
6606
diff
changeset
|
651 |
* packets for which block ack was negotiated. |
ec22aa763e2d
Bug 978: Consolidate Wi-Fi MAC high functionality
Dean Armstrong <deanarm@gmail.com>
parents:
6606
diff
changeset
|
652 |
* |
ec22aa763e2d
Bug 978: Consolidate Wi-Fi MAC high functionality
Dean Armstrong <deanarm@gmail.com>
parents:
6606
diff
changeset
|
653 |
* This function is typically invoked only by ns3::RegularWifiMac |
ec22aa763e2d
Bug 978: Consolidate Wi-Fi MAC high functionality
Dean Armstrong <deanarm@gmail.com>
parents:
6606
diff
changeset
|
654 |
* when the STA (which may be non-AP in ESS, or in an IBSS) has |
ec22aa763e2d
Bug 978: Consolidate Wi-Fi MAC high functionality
Dean Armstrong <deanarm@gmail.com>
parents:
6606
diff
changeset
|
655 |
* received an ADDBA Request frame and is transmitting an ADDBA |
ec22aa763e2d
Bug 978: Consolidate Wi-Fi MAC high functionality
Dean Armstrong <deanarm@gmail.com>
parents:
6606
diff
changeset
|
656 |
* Response frame. At this point MacLow must allocate buffers to |
ec22aa763e2d
Bug 978: Consolidate Wi-Fi MAC high functionality
Dean Armstrong <deanarm@gmail.com>
parents:
6606
diff
changeset
|
657 |
* collect all correctly received packets belonging to the category |
ec22aa763e2d
Bug 978: Consolidate Wi-Fi MAC high functionality
Dean Armstrong <deanarm@gmail.com>
parents:
6606
diff
changeset
|
658 |
* for which Block Ack was negotiated. |
5956
e9918be47f78
MacLow now buffers QoS MPDUs under Block Ack
Mirko Banchi <mk.banchi@gmail.com>
parents:
5955
diff
changeset
|
659 |
*/ |
6673
ec22aa763e2d
Bug 978: Consolidate Wi-Fi MAC high functionality
Dean Armstrong <deanarm@gmail.com>
parents:
6606
diff
changeset
|
660 |
void CreateBlockAckAgreement (const MgtAddBaResponseHeader *respHdr, |
ec22aa763e2d
Bug 978: Consolidate Wi-Fi MAC high functionality
Dean Armstrong <deanarm@gmail.com>
parents:
6606
diff
changeset
|
661 |
Mac48Address originator, |
5956
e9918be47f78
MacLow now buffers QoS MPDUs under Block Ack
Mirko Banchi <mk.banchi@gmail.com>
parents:
5955
diff
changeset
|
662 |
uint16_t startingSeq); |
e9918be47f78
MacLow now buffers QoS MPDUs under Block Ack
Mirko Banchi <mk.banchi@gmail.com>
parents:
5955
diff
changeset
|
663 |
/** |
6273
8d70de29d514
spell check, mostly in comments.
Andrey Mazo <mazo@iitp.ru>
parents:
6068
diff
changeset
|
664 |
* \param originator Address of peer participating in Block Ack mechanism. |
5956
e9918be47f78
MacLow now buffers QoS MPDUs under Block Ack
Mirko Banchi <mk.banchi@gmail.com>
parents:
5955
diff
changeset
|
665 |
* \param tid TID for which Block Ack was created. |
e9918be47f78
MacLow now buffers QoS MPDUs under Block Ack
Mirko Banchi <mk.banchi@gmail.com>
parents:
5955
diff
changeset
|
666 |
* |
e9918be47f78
MacLow now buffers QoS MPDUs under Block Ack
Mirko Banchi <mk.banchi@gmail.com>
parents:
5955
diff
changeset
|
667 |
* Checks if exists an established block ack agreement with <i>originator</i> |
e9918be47f78
MacLow now buffers QoS MPDUs under Block Ack
Mirko Banchi <mk.banchi@gmail.com>
parents:
5955
diff
changeset
|
668 |
* for tid <i>tid</i>. If the agreement exists, tears down it. This function is typically |
e9918be47f78
MacLow now buffers QoS MPDUs under Block Ack
Mirko Banchi <mk.banchi@gmail.com>
parents:
5955
diff
changeset
|
669 |
* invoked when a DELBA frame is received from <i>originator</i>. |
e9918be47f78
MacLow now buffers QoS MPDUs under Block Ack
Mirko Banchi <mk.banchi@gmail.com>
parents:
5955
diff
changeset
|
670 |
*/ |
e9918be47f78
MacLow now buffers QoS MPDUs under Block Ack
Mirko Banchi <mk.banchi@gmail.com>
parents:
5955
diff
changeset
|
671 |
void DestroyBlockAckAgreement (Mac48Address originator, uint8_t tid); |
5964
8a59a619c30e
add support to block ack tear down in MacLow
Mirko Banchi <mk.banchi@gmail.com>
parents:
5958
diff
changeset
|
672 |
/** |
8a59a619c30e
add support to block ack tear down in MacLow
Mirko Banchi <mk.banchi@gmail.com>
parents:
5958
diff
changeset
|
673 |
* \param ac Access class managed by the queue. |
8a59a619c30e
add support to block ack tear down in MacLow
Mirko Banchi <mk.banchi@gmail.com>
parents:
5958
diff
changeset
|
674 |
* \param listener The listener for the queue. |
8a59a619c30e
add support to block ack tear down in MacLow
Mirko Banchi <mk.banchi@gmail.com>
parents:
5958
diff
changeset
|
675 |
* |
8a59a619c30e
add support to block ack tear down in MacLow
Mirko Banchi <mk.banchi@gmail.com>
parents:
5958
diff
changeset
|
676 |
* The lifetime of the registered listener is typically equal to the lifetime of the queue |
8a59a619c30e
add support to block ack tear down in MacLow
Mirko Banchi <mk.banchi@gmail.com>
parents:
5958
diff
changeset
|
677 |
* associated to this AC. |
8a59a619c30e
add support to block ack tear down in MacLow
Mirko Banchi <mk.banchi@gmail.com>
parents:
5958
diff
changeset
|
678 |
*/ |
6331
eee2eab36748
Bug 910: Replace AccessClass with 802.11-style AcIndex
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
679 |
void RegisterBlockAckListenerForAc (enum AcIndex ac, MacLowBlockAckEventListener *listener); |
10459
f2e90c12a44f
base implementation of the IEEE 802.11p standard
Junling Bu <linlinjavaer@gmail.com>
parents:
10202
diff
changeset
|
680 |
protected: |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
681 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
682 |
* Return a TXVECTOR for the DATA frame given the destination. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
683 |
* The function consults WifiRemoteStationManager, which controls the rate |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
684 |
* to different destinations. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
685 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
686 |
* \param packet the packet being asked for TXVECTOR |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
687 |
* \param hdr the WifiMacHeader |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
688 |
* \return TXVECTOR for the given packet |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
689 |
*/ |
10459
f2e90c12a44f
base implementation of the IEEE 802.11p standard
Junling Bu <linlinjavaer@gmail.com>
parents:
10202
diff
changeset
|
690 |
virtual WifiTxVector GetDataTxVector (Ptr<const Packet> packet, const WifiMacHeader *hdr) const; |
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
691 |
private: |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
692 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
693 |
* Cancel all scheduled events. Called before beginning a transmission |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
694 |
* or switching channel. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
695 |
*/ |
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
696 |
void CancelAllEvents (void); |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
697 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
698 |
* Return the total ACK size (including FCS trailer). |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
699 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
700 |
* \return the total ACK size |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
701 |
*/ |
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
702 |
uint32_t GetAckSize (void) const; |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
703 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
704 |
* Return the total Block ACK size (including FCS trailer). |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
705 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
706 |
* \param type the Block ACK type |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
707 |
* \return the total Block ACK size |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
708 |
*/ |
5957
dd5ece55acb9
handle block ack and block ack request frames in MacLow
Mirko Banchi <mk.banchi@gmail.com>
parents:
5956
diff
changeset
|
709 |
uint32_t GetBlockAckSize (enum BlockAckType type) const; |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
710 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
711 |
* Return the total RTS size (including FCS trailer). |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
712 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
713 |
* \return the total RTS size |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
714 |
*/ |
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
715 |
uint32_t GetRtsSize (void) const; |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
716 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
717 |
* Return the total CTS size (including FCS trailer). |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
718 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
719 |
* \return the total CTS size |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
720 |
*/ |
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
721 |
uint32_t GetCtsSize (void) const; |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
722 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
723 |
* Return the total size of the packet after WifiMacHeader and FCS trailer |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
724 |
* have been added. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
725 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
726 |
* \param packet the packet to be encapsulated with WifiMacHeader and FCS trailer |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
727 |
* \param hdr the WifiMacHeader |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
728 |
* \return the total packet size |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
729 |
*/ |
2268
0e57ac711220
introduce a low latency parameter for rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2159
diff
changeset
|
730 |
uint32_t GetSize (Ptr<const Packet> packet, const WifiMacHeader *hdr) const; |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
731 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
732 |
* Forward the packet down to WifiPhy for transmission. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
733 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
734 |
* \param packet |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
735 |
* \param hdr |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
736 |
* \param txVector |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
737 |
* \param preamble |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
738 |
*/ |
10202
d32ee5f55fdb
remove unimplemented functions
Junling Bu <linlinjavaer@gmail.com>
parents:
10139
diff
changeset
|
739 |
void ForwardDown (Ptr<const Packet> packet, const WifiMacHeader *hdr, |
10139 | 740 |
WifiTxVector txVector, WifiPreamble preamble); |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
741 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
742 |
* Return a TXVECTOR for the RTS frame given the destination. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
743 |
* The function consults WifiRemoteStationManager, which controls the rate |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
744 |
* to different destinations. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
745 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
746 |
* \param packet the packet being asked for RTS TXVECTOR |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
747 |
* \param hdr the WifiMacHeader |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
748 |
* \return TXVECTOR for the RTS of the given packet |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
749 |
*/ |
10139 | 750 |
WifiTxVector GetRtsTxVector (Ptr<const Packet> packet, const WifiMacHeader *hdr) const; |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
751 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
752 |
* Return a TXVECTOR for the CTS frame given the destination and the mode of the RTS |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
753 |
* used by the sender. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
754 |
* The function consults WifiRemoteStationManager, which controls the rate |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
755 |
* to different destinations. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
756 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
757 |
* \param to the MAC address of the CTS receiver |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
758 |
* \param rtsTxMode the mode of the RTS used by the sender |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
759 |
* \return TXVECTOR for the CTS |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
760 |
*/ |
10139 | 761 |
WifiTxVector GetCtsTxVector (Mac48Address to, WifiMode rtsTxMode) const; |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
762 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
763 |
* Return a TXVECTOR for the ACK frame given the destination and the mode of the DATA |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
764 |
* used by the sender. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
765 |
* The function consults WifiRemoteStationManager, which controls the rate |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
766 |
* to different destinations. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
767 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
768 |
* \param to the MAC address of the ACK receiver |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
769 |
* \param dataTxMode the mode of the DATA used by the sender |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
770 |
* \return TXVECTOR for the ACK |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
771 |
*/ |
10139 | 772 |
WifiTxVector GetAckTxVector (Mac48Address to, WifiMode dataTxMode) const; |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
773 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
774 |
* Return a TXVECTOR for the Block ACK frame given the destination and the mode of the DATA |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
775 |
* used by the sender. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
776 |
* The function consults WifiRemoteStationManager, which controls the rate |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
777 |
* to different destinations. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
778 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
779 |
* \param to the MAC address of the Block ACK receiver |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
780 |
* \param dataTxMode the mode of the DATA used by the sender |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
781 |
* \return TXVECTOR for the Block ACK |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
782 |
*/ |
10139 | 783 |
WifiTxVector GetBlockAckTxVector (Mac48Address to, WifiMode dataTxMode) const; |
784 |
||
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
785 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
786 |
* Return a TXVECTOR for the CTS-to-self frame. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
787 |
* The function consults WifiRemoteStationManager, which controls the rate |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
788 |
* to different destinations. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
789 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
790 |
* \param packet the packet that requires CTS-to-self |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
791 |
* \param hdr the Wifi header of the packet |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
792 |
* \return TXVECTOR for the CTS-to-self operation |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
793 |
*/ |
10139 | 794 |
WifiTxVector GetCtsToSelfTxVector (Ptr<const Packet> packet, const WifiMacHeader *hdr) const; |
795 |
||
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
796 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
797 |
* Return a TXVECTOR for the CTS frame given the destination and the mode of the RTS |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
798 |
* used by the sender. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
799 |
* The function consults WifiRemoteStationManager, which controls the rate |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
800 |
* to different destinations. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
801 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
802 |
* \param to the MAC address of the CTS receiver |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
803 |
* \param rtsTxMode the mode of the RTS used by the sender |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
804 |
* \return TXVECTOR for the CTS |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
805 |
*/ |
10139 | 806 |
WifiTxVector GetCtsTxVectorForRts (Mac48Address to, WifiMode rtsTxMode) const; |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
807 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
808 |
* Return a TXVECTOR for the Block ACK frame given the destination and the mode of the DATA |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
809 |
* used by the sender. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
810 |
* The function consults WifiRemoteStationManager, which controls the rate |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
811 |
* to different destinations. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
812 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
813 |
* \param to the MAC address of the Block ACK receiver |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
814 |
* \param dataTxMode the mode of the DATA used by the sender |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
815 |
* \return TXVECTOR for the Block ACK |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
816 |
*/ |
10139 | 817 |
WifiTxVector GetAckTxVectorForData (Mac48Address to, WifiMode dataTxMode) const; |
818 |
||
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
819 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
820 |
* Return the time required to transmit the CTS (including preamble and FCS). |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
821 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
822 |
* \param ctsTxVector |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
823 |
* \return the time required to transmit the CTS (including preamble and FCS) |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
824 |
*/ |
10139 | 825 |
Time GetCtsDuration (WifiTxVector ctsTxVector) const; |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
826 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
827 |
* Return the time required to transmit the CTS to the specified address |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
828 |
* given the TXVECTOR of the RTS (including preamble and FCS). |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
829 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
830 |
* \param to |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
831 |
* \param rtsTxVector |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
832 |
* \return the time required to transmit the CTS (including preamble and FCS) |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
833 |
*/ |
10139 | 834 |
Time GetCtsDuration (Mac48Address to, WifiTxVector rtsTxVector) const; |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
835 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
836 |
* Return the time required to transmit the ACK (including preamble and FCS). |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
837 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
838 |
* \param ackTxVector |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
839 |
* \return the time required to transmit the ACK (including preamble and FCS) |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
840 |
*/ |
10139 | 841 |
Time GetAckDuration (WifiTxVector ackTxVector) const; |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
842 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
843 |
* Return the time required to transmit the ACK to the specified address |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
844 |
* given the TXVECTOR of the DATA (including preamble and FCS). |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
845 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
846 |
* \param to |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
847 |
* \param dataTxVector |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
848 |
* \return the time required to transmit the ACK (including preamble and FCS) |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
849 |
*/ |
10139 | 850 |
Time GetAckDuration (Mac48Address to, WifiTxVector dataTxVector) const; |
851 |
Time GetBlockAckDuration (Mac48Address to, WifiTxVector blockAckReqTxVector, enum BlockAckType type) const; |
|
852 |
||
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
853 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
854 |
* Check if CTS-to-self mechanism should be used for the current packet. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
855 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
856 |
* \return true if CTS-to-self mechanism should be used for the current packet, |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
857 |
* false otherwise |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
858 |
*/ |
10139 | 859 |
bool NeedCtsToSelf (void); |
860 |
||
2268
0e57ac711220
introduce a low latency parameter for rate control algorithms
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2159
diff
changeset
|
861 |
Time CalculateOverallTxTime (Ptr<const Packet> packet, |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
862 |
const WifiMacHeader* hdr, |
5819
514ec98954ab
Wifi code cleanup: Correcting various const keyword ordering and removing superfluous (boolean)?true:false.
Timo Bingmann <tbns@idlebox.net>
parents:
5192
diff
changeset
|
863 |
const MacLowTransmissionParameters ¶ms) const; |
10139 | 864 |
void NotifyNav (Ptr<const Packet> packet,const WifiMacHeader &hdr, WifiMode txMode, WifiPreamble preamble); |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
865 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
866 |
* Reset NAV with the given duration. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
867 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
868 |
* \param duration |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
869 |
*/ |
2146
40ad60ac9912
replace Dcf with DcfManager
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2059
diff
changeset
|
870 |
void DoNavResetNow (Time duration); |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
871 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
872 |
* Start NAV with the given duration. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
873 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
874 |
* \param duration |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
875 |
* \return true if NAV is resetted |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
876 |
*/ |
2146
40ad60ac9912
replace Dcf with DcfManager
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2059
diff
changeset
|
877 |
bool DoNavStartNow (Time duration); |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
878 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
879 |
* Check if NAV is zero. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
880 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
881 |
* \return true if NAV is zero, |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
882 |
* false otherwise |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
883 |
*/ |
2146
40ad60ac9912
replace Dcf with DcfManager
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2059
diff
changeset
|
884 |
bool IsNavZero (void) const; |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
885 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
886 |
* Notify DcfManager (via DcfListener) that |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
887 |
* ACK timer should be started for the given |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
888 |
* duration. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
889 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
890 |
* \param duration |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
891 |
*/ |
4509
b2654e0f071d
bug 556: DcfManager does not handle AckTimeout properly when there are multiple queues
Kirill V. Andreev <kirillano@yandex.ru>
parents:
3906
diff
changeset
|
892 |
void NotifyAckTimeoutStartNow (Time duration); |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
893 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
894 |
* Notify DcfManager (via DcfListener) that |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
895 |
* ACK timer should be resetted. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
896 |
*/ |
4509
b2654e0f071d
bug 556: DcfManager does not handle AckTimeout properly when there are multiple queues
Kirill V. Andreev <kirillano@yandex.ru>
parents:
3906
diff
changeset
|
897 |
void NotifyAckTimeoutResetNow (); |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
898 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
899 |
* Notify DcfManager (via DcfListener) that |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
900 |
* CTS timer should be started for the given |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
901 |
* duration. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
902 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
903 |
* \param duration |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
904 |
*/ |
4509
b2654e0f071d
bug 556: DcfManager does not handle AckTimeout properly when there are multiple queues
Kirill V. Andreev <kirillano@yandex.ru>
parents:
3906
diff
changeset
|
905 |
void NotifyCtsTimeoutStartNow (Time duration); |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
906 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
907 |
* Notify DcfManager (via DcfListener) that |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
908 |
* CTS timer should be resetted. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
909 |
*/ |
4509
b2654e0f071d
bug 556: DcfManager does not handle AckTimeout properly when there are multiple queues
Kirill V. Andreev <kirillano@yandex.ru>
parents:
3906
diff
changeset
|
910 |
void NotifyCtsTimeoutResetNow (); |
6595
3289a9d91620
run check-style on mac-low.h/cc
Mirko Banchi <mk.banchi@gmail.com>
parents:
6331
diff
changeset
|
911 |
|
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
912 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
913 |
* Reset NAV after CTS was missed when the NAV was |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
914 |
* setted with RTS. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
915 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
916 |
* \param rtsEndRxTime |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
917 |
*/ |
2146
40ad60ac9912
replace Dcf with DcfManager
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2059
diff
changeset
|
918 |
void NavCounterResetCtsMissed (Time rtsEndRxTime); |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
919 |
|
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
920 |
/* Event handlers */ |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
921 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
922 |
* Event handler when normal ACK timeout occurs. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
923 |
*/ |
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
924 |
void NormalAckTimeout (void); |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
925 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
926 |
* Event handler when fast ACK timeout occurs (idle). |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
927 |
*/ |
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
928 |
void FastAckTimeout (void); |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
929 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
930 |
* Event handler when super fast ACK timeout occurs. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
931 |
*/ |
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
932 |
void SuperFastAckTimeout (void); |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
933 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
934 |
* Event handler when fast ACK timeout occurs (busy). |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
935 |
*/ |
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
936 |
void FastAckFailedTimeout (void); |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
937 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
938 |
* Event handler when block ACK timeout occurs. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
939 |
*/ |
5958 | 940 |
void BlockAckTimeout (void); |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
941 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
942 |
* Event handler when CTS timeout occurs. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
943 |
*/ |
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
944 |
void CtsTimeout (void); |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
945 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
946 |
* Send CTS for a CTS-to-self mechanism. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
947 |
*/ |
10139 | 948 |
void SendCtsToSelf (void); |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
949 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
950 |
* Send CTS after receiving RTS. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
951 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
952 |
* \param source |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
953 |
* \param duration |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
954 |
* \param txMode |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
955 |
* \param rtsSnr |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
956 |
*/ |
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
957 |
void SendCtsAfterRts (Mac48Address source, Time duration, WifiMode txMode, double rtsSnr); |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
958 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
959 |
* Send ACK after receiving DATA. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
960 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
961 |
* \param source |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
962 |
* \param duration |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
963 |
* \param dataTxMode |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
964 |
* \param dataSnr |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
965 |
*/ |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
966 |
void SendAckAfterData (Mac48Address source, Time duration, WifiMode dataTxMode, double dataSnr); |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
967 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
968 |
* Send DATA after receiving CTS. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
969 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
970 |
* \param source |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
971 |
* \param duration |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
972 |
* \param txMode |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
973 |
*/ |
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
974 |
void SendDataAfterCts (Mac48Address source, Time duration, WifiMode txMode); |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
975 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
976 |
* Event handler that is usually scheduled to fired at the appropriate time |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
977 |
* after completing transmissions. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
978 |
*/ |
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
979 |
void WaitSifsAfterEndTx (void); |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
980 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
981 |
* A transmission that does not require an ACK has completed. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
982 |
*/ |
9176
41ab1e874804
Bug 555 - DCF immediate access fix
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
7385
diff
changeset
|
983 |
void EndTxNoAck (void); |
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
984 |
|
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
985 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
986 |
* Send RTS to begin RTS-CTS-DATA-ACK transaction. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
987 |
*/ |
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
988 |
void SendRtsForPacket (void); |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
989 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
990 |
* Send DATA packet, which can be DATA-ACK or |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
991 |
* RTS-CTS-DATA-ACK transaction. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
992 |
*/ |
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
993 |
void SendDataPacket (void); |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
994 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
995 |
* Start a DATA timer by scheduling appropriate |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
996 |
* ACK timeout. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
997 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
998 |
* \param dataTxVector |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
999 |
*/ |
10139 | 1000 |
void StartDataTxTimers (WifiTxVector dataTxVector); |
2530
05f9cec44621
avoid memory leaks
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2524
diff
changeset
|
1001 |
virtual void DoDispose (void); |
5956
e9918be47f78
MacLow now buffers QoS MPDUs under Block Ack
Mirko Banchi <mk.banchi@gmail.com>
parents:
5955
diff
changeset
|
1002 |
/** |
6273
8d70de29d514
spell check, mostly in comments.
Andrey Mazo <mazo@iitp.ru>
parents:
6068
diff
changeset
|
1003 |
* \param originator Address of peer participating in Block Ack mechanism. |
5956
e9918be47f78
MacLow now buffers QoS MPDUs under Block Ack
Mirko Banchi <mk.banchi@gmail.com>
parents:
5955
diff
changeset
|
1004 |
* \param tid TID for which Block Ack was created. |
e9918be47f78
MacLow now buffers QoS MPDUs under Block Ack
Mirko Banchi <mk.banchi@gmail.com>
parents:
5955
diff
changeset
|
1005 |
* \param seq Starting sequence |
e9918be47f78
MacLow now buffers QoS MPDUs under Block Ack
Mirko Banchi <mk.banchi@gmail.com>
parents:
5955
diff
changeset
|
1006 |
* |
e9918be47f78
MacLow now buffers QoS MPDUs under Block Ack
Mirko Banchi <mk.banchi@gmail.com>
parents:
5955
diff
changeset
|
1007 |
* This function forward up all completed "old" packets with sequence number |
e9918be47f78
MacLow now buffers QoS MPDUs under Block Ack
Mirko Banchi <mk.banchi@gmail.com>
parents:
5955
diff
changeset
|
1008 |
* smaller than <i>seq</i>. All comparison are performed circularly mod 4096. |
e9918be47f78
MacLow now buffers QoS MPDUs under Block Ack
Mirko Banchi <mk.banchi@gmail.com>
parents:
5955
diff
changeset
|
1009 |
*/ |
e9918be47f78
MacLow now buffers QoS MPDUs under Block Ack
Mirko Banchi <mk.banchi@gmail.com>
parents:
5955
diff
changeset
|
1010 |
void RxCompleteBufferedPacketsWithSmallerSequence (uint16_t seq, Mac48Address originator, uint8_t tid); |
e9918be47f78
MacLow now buffers QoS MPDUs under Block Ack
Mirko Banchi <mk.banchi@gmail.com>
parents:
5955
diff
changeset
|
1011 |
/** |
6273
8d70de29d514
spell check, mostly in comments.
Andrey Mazo <mazo@iitp.ru>
parents:
6068
diff
changeset
|
1012 |
* \param originator Address of peer participating in Block Ack mechanism. |
5956
e9918be47f78
MacLow now buffers QoS MPDUs under Block Ack
Mirko Banchi <mk.banchi@gmail.com>
parents:
5955
diff
changeset
|
1013 |
* \param tid TID for which Block Ack was created. |
e9918be47f78
MacLow now buffers QoS MPDUs under Block Ack
Mirko Banchi <mk.banchi@gmail.com>
parents:
5955
diff
changeset
|
1014 |
* |
e9918be47f78
MacLow now buffers QoS MPDUs under Block Ack
Mirko Banchi <mk.banchi@gmail.com>
parents:
5955
diff
changeset
|
1015 |
* This method is typically invoked when a MPDU with ack policy |
e9918be47f78
MacLow now buffers QoS MPDUs under Block Ack
Mirko Banchi <mk.banchi@gmail.com>
parents:
5955
diff
changeset
|
1016 |
* subfield set to Normal Ack is received and a block ack agreement |
e9918be47f78
MacLow now buffers QoS MPDUs under Block Ack
Mirko Banchi <mk.banchi@gmail.com>
parents:
5955
diff
changeset
|
1017 |
* for that packet exists. |
e9918be47f78
MacLow now buffers QoS MPDUs under Block Ack
Mirko Banchi <mk.banchi@gmail.com>
parents:
5955
diff
changeset
|
1018 |
* This happens when the originator of block ack has only few MPDUs to send. |
e9918be47f78
MacLow now buffers QoS MPDUs under Block Ack
Mirko Banchi <mk.banchi@gmail.com>
parents:
5955
diff
changeset
|
1019 |
* All completed MSDUs starting with starting sequence number of block ack |
6606
2f2b67218332
Bug 981: use a cache to keep track of received MPDUs under block ack
Mirko Banchi <mk.banchi@gmail.com>
parents:
6599
diff
changeset
|
1020 |
* agreement are forward up to WifiMac until there is an incomplete or missing MSDU. |
5956
e9918be47f78
MacLow now buffers QoS MPDUs under Block Ack
Mirko Banchi <mk.banchi@gmail.com>
parents:
5955
diff
changeset
|
1021 |
* See section 9.10.4 in IEEE802.11 standard for more details. |
e9918be47f78
MacLow now buffers QoS MPDUs under Block Ack
Mirko Banchi <mk.banchi@gmail.com>
parents:
5955
diff
changeset
|
1022 |
*/ |
6599
8c1a255c05a3
Rename MacLow::RxCompleteBufferedPacket to a more appropriate name
Mirko Banchi <mk.banchi@gmail.com>
parents:
6595
diff
changeset
|
1023 |
void RxCompleteBufferedPacketsUntilFirstLost (Mac48Address originator, uint8_t tid); |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
1024 |
/* |
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
1025 |
* This method checks if exists a valid established block ack agreement. |
5956
e9918be47f78
MacLow now buffers QoS MPDUs under Block Ack
Mirko Banchi <mk.banchi@gmail.com>
parents:
5955
diff
changeset
|
1026 |
* If there is, store the packet without pass it up to WifiMac. The packet is buffered |
e9918be47f78
MacLow now buffers QoS MPDUs under Block Ack
Mirko Banchi <mk.banchi@gmail.com>
parents:
5955
diff
changeset
|
1027 |
* in order of increasing sequence control field. All comparison are performed |
e9918be47f78
MacLow now buffers QoS MPDUs under Block Ack
Mirko Banchi <mk.banchi@gmail.com>
parents:
5955
diff
changeset
|
1028 |
* circularly modulo 2^12. |
e9918be47f78
MacLow now buffers QoS MPDUs under Block Ack
Mirko Banchi <mk.banchi@gmail.com>
parents:
5955
diff
changeset
|
1029 |
*/ |
e9918be47f78
MacLow now buffers QoS MPDUs under Block Ack
Mirko Banchi <mk.banchi@gmail.com>
parents:
5955
diff
changeset
|
1030 |
bool StoreMpduIfNeeded (Ptr<Packet> packet, WifiMacHeader hdr); |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
1031 |
/** |
5957
dd5ece55acb9
handle block ack and block ack request frames in MacLow
Mirko Banchi <mk.banchi@gmail.com>
parents:
5956
diff
changeset
|
1032 |
* Invoked after that a block ack request has been received. Looks for corresponding |
dd5ece55acb9
handle block ack and block ack request frames in MacLow
Mirko Banchi <mk.banchi@gmail.com>
parents:
5956
diff
changeset
|
1033 |
* block ack agreement and creates block ack bitmap on a received packets basis. |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
1034 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
1035 |
* \param reqHdr |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
1036 |
* \param originator |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
1037 |
* \param duration |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
1038 |
* \param blockAckReqTxMode |
5957
dd5ece55acb9
handle block ack and block ack request frames in MacLow
Mirko Banchi <mk.banchi@gmail.com>
parents:
5956
diff
changeset
|
1039 |
*/ |
dd5ece55acb9
handle block ack and block ack request frames in MacLow
Mirko Banchi <mk.banchi@gmail.com>
parents:
5956
diff
changeset
|
1040 |
void SendBlockAckAfterBlockAckRequest (const CtrlBAckRequestHeader reqHdr, Mac48Address originator, |
dd5ece55acb9
handle block ack and block ack request frames in MacLow
Mirko Banchi <mk.banchi@gmail.com>
parents:
5956
diff
changeset
|
1041 |
Time duration, WifiMode blockAckReqTxMode); |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
1042 |
/** |
5957
dd5ece55acb9
handle block ack and block ack request frames in MacLow
Mirko Banchi <mk.banchi@gmail.com>
parents:
5956
diff
changeset
|
1043 |
* This method creates block ack frame with header equals to <i>blockAck</i> and start its transmission. |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
1044 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
1045 |
* \param blockAck |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
1046 |
* \param originator |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
1047 |
* \param immediate |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
1048 |
* \param duration |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
1049 |
* \param blockAckReqTxMode |
5957
dd5ece55acb9
handle block ack and block ack request frames in MacLow
Mirko Banchi <mk.banchi@gmail.com>
parents:
5956
diff
changeset
|
1050 |
*/ |
dd5ece55acb9
handle block ack and block ack request frames in MacLow
Mirko Banchi <mk.banchi@gmail.com>
parents:
5956
diff
changeset
|
1051 |
void SendBlockAckResponse (const CtrlBAckResponseHeader* blockAck, Mac48Address originator, bool immediate, |
dd5ece55acb9
handle block ack and block ack request frames in MacLow
Mirko Banchi <mk.banchi@gmail.com>
parents:
5956
diff
changeset
|
1052 |
Time duration, WifiMode blockAckReqTxMode); |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
1053 |
/** |
5964
8a59a619c30e
add support to block ack tear down in MacLow
Mirko Banchi <mk.banchi@gmail.com>
parents:
5958
diff
changeset
|
1054 |
* Every time that a block ack request or a packet with ack policy equals to <i>block ack</i> |
8a59a619c30e
add support to block ack tear down in MacLow
Mirko Banchi <mk.banchi@gmail.com>
parents:
5958
diff
changeset
|
1055 |
* are received, if a relative block ack agreement exists and the value of inactivity timeout |
8a59a619c30e
add support to block ack tear down in MacLow
Mirko Banchi <mk.banchi@gmail.com>
parents:
5958
diff
changeset
|
1056 |
* is not 0, the timer is reset. |
8a59a619c30e
add support to block ack tear down in MacLow
Mirko Banchi <mk.banchi@gmail.com>
parents:
5958
diff
changeset
|
1057 |
* see section 11.5.3 in IEEE802.11e for more details. |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
1058 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
1059 |
* \param agreement |
5964
8a59a619c30e
add support to block ack tear down in MacLow
Mirko Banchi <mk.banchi@gmail.com>
parents:
5958
diff
changeset
|
1060 |
*/ |
8a59a619c30e
add support to block ack tear down in MacLow
Mirko Banchi <mk.banchi@gmail.com>
parents:
5958
diff
changeset
|
1061 |
void ResetBlockAckInactivityTimerIfNeeded (BlockAckAgreement &agreement); |
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
1062 |
|
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
1063 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
1064 |
* Set up WifiPhy listener for this MacLow. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
1065 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
1066 |
* \param phy the WifiPhy this MacLow is connected to |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
1067 |
*/ |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
1068 |
void SetupPhyMacLowListener (Ptr<WifiPhy> phy); |
5189 | 1069 |
|
10507
2081aa152526
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10483
diff
changeset
|
1070 |
Ptr<WifiPhy> m_phy; //!< Pointer to WifiPhy (actually send/receives frames) |
2081aa152526
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10483
diff
changeset
|
1071 |
Ptr<WifiRemoteStationManager> m_stationManager; //!< Pointer to WifiRemoteStationManager (rate control) |
2081aa152526
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10483
diff
changeset
|
1072 |
MacLowRxCallback m_rxCallback; //!< Callback to pass packet up |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
1073 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
1074 |
* typedef for an iterator for a list of MacLowDcfListener. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
1075 |
*/ |
4509
b2654e0f071d
bug 556: DcfManager does not handle AckTimeout properly when there are multiple queues
Kirill V. Andreev <kirillano@yandex.ru>
parents:
3906
diff
changeset
|
1076 |
typedef std::vector<MacLowDcfListener *>::const_iterator DcfListenersCI; |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
1077 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
1078 |
* typedef for a list of MacLowDcfListener. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10459
diff
changeset
|
1079 |
*/ |
4509
b2654e0f071d
bug 556: DcfManager does not handle AckTimeout properly when there are multiple queues
Kirill V. Andreev <kirillano@yandex.ru>
parents:
3906
diff
changeset
|
1080 |
typedef std::vector<MacLowDcfListener *> DcfListeners; |
10507
2081aa152526
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10483
diff
changeset
|
1081 |
DcfListeners m_dcfListeners; //!< List of MacLowDcfListener (pass events to Dcf) |
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
1082 |
|
10507
2081aa152526
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10483
diff
changeset
|
1083 |
EventId m_normalAckTimeoutEvent; //!< Normal ACK timeout event |
2081aa152526
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10483
diff
changeset
|
1084 |
EventId m_fastAckTimeoutEvent; //!< Fast ACK timeout event |
2081aa152526
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10483
diff
changeset
|
1085 |
EventId m_superFastAckTimeoutEvent; //!< Super fast ACK timeout event |
2081aa152526
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10483
diff
changeset
|
1086 |
EventId m_fastAckFailedTimeoutEvent; //!< Fast ACK failed timeout event |
2081aa152526
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10483
diff
changeset
|
1087 |
EventId m_blockAckTimeoutEvent; //!< Block ACK timeout event |
2081aa152526
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10483
diff
changeset
|
1088 |
EventId m_ctsTimeoutEvent; //!< CTS timeout event |
2081aa152526
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10483
diff
changeset
|
1089 |
EventId m_sendCtsEvent; //!< Event to send CTS |
2081aa152526
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10483
diff
changeset
|
1090 |
EventId m_sendAckEvent; //!< Event to send ACK |
2081aa152526
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10483
diff
changeset
|
1091 |
EventId m_sendDataEvent; //!< Event to send DATA |
2081aa152526
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10483
diff
changeset
|
1092 |
EventId m_waitSifsEvent; //!< Wait for SIFS event |
2081aa152526
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10483
diff
changeset
|
1093 |
EventId m_endTxNoAckEvent; //!< Event for finishing transmission that does not require ACK |
2081aa152526
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10483
diff
changeset
|
1094 |
EventId m_navCounterResetCtsMissed; //!< Event to reset NAV when CTS is not received |
2081aa152526
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10483
diff
changeset
|
1095 |
EventId m_waitRifsEvent; //!< Wait for RIFS event |
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
1096 |
|
10507
2081aa152526
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10483
diff
changeset
|
1097 |
Ptr<Packet> m_currentPacket; //!< Current packet transmitted/to be transmitted |
2081aa152526
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10483
diff
changeset
|
1098 |
WifiMacHeader m_currentHdr; //!< Header of the current packet |
2081aa152526
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10483
diff
changeset
|
1099 |
MacLowTransmissionParameters m_txParams; //!< Transmission parameters of the current packet |
2081aa152526
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10483
diff
changeset
|
1100 |
MacLowTransmissionListener *m_listener; //!< Transmission listener for the current packet |
2081aa152526
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10483
diff
changeset
|
1101 |
Mac48Address m_self; //!< Address of this MacLow (Mac48Address) |
2081aa152526
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10483
diff
changeset
|
1102 |
Mac48Address m_bssid; //!< BSSID address (Mac48Address) |
2081aa152526
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10483
diff
changeset
|
1103 |
Time m_ackTimeout; //!< ACK timeout duration |
2081aa152526
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10483
diff
changeset
|
1104 |
Time m_basicBlockAckTimeout; //!< Basic block ACK timeout duration |
2081aa152526
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10483
diff
changeset
|
1105 |
Time m_compressedBlockAckTimeout; //!< Compressed block ACK timeout duration |
2081aa152526
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10483
diff
changeset
|
1106 |
Time m_ctsTimeout; //!< CTS timeout duration |
2081aa152526
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10483
diff
changeset
|
1107 |
Time m_sifs; //!< Short Interframe Space (SIFS) duration |
2081aa152526
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10483
diff
changeset
|
1108 |
Time m_slotTime; //!< Slot duration |
2081aa152526
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10483
diff
changeset
|
1109 |
Time m_pifs; //!< PCF Interframe Space (PIFS) duration |
2081aa152526
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10483
diff
changeset
|
1110 |
Time m_rifs; //!< Reduced Interframe Space (RIFS) duration |
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
1111 |
|
10507
2081aa152526
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10483
diff
changeset
|
1112 |
Time m_lastNavStart; //!< The time when the latest NAV started |
2081aa152526
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10483
diff
changeset
|
1113 |
Time m_lastNavDuration; //!< The duration of the latest NAV |
5189 | 1114 |
|
10507
2081aa152526
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10483
diff
changeset
|
1115 |
bool m_promisc; //!< Flag if the device is operating in promiscuous mode |
7333
17b50c5b062c
[Bug 827] promiscuous mode for wifi
Ruben Merz <ruben@net.t-labs.tu-berlin.de>
parents:
7141
diff
changeset
|
1116 |
|
10507
2081aa152526
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10483
diff
changeset
|
1117 |
class PhyMacLowListener * m_phyMacLowListener; //!< Listerner needed to monitor when a channel switching occurs. |
5956
e9918be47f78
MacLow now buffers QoS MPDUs under Block Ack
Mirko Banchi <mk.banchi@gmail.com>
parents:
5955
diff
changeset
|
1118 |
|
e9918be47f78
MacLow now buffers QoS MPDUs under Block Ack
Mirko Banchi <mk.banchi@gmail.com>
parents:
5955
diff
changeset
|
1119 |
/* |
e9918be47f78
MacLow now buffers QoS MPDUs under Block Ack
Mirko Banchi <mk.banchi@gmail.com>
parents:
5955
diff
changeset
|
1120 |
* BlockAck data structures. |
e9918be47f78
MacLow now buffers QoS MPDUs under Block Ack
Mirko Banchi <mk.banchi@gmail.com>
parents:
5955
diff
changeset
|
1121 |
*/ |
e9918be47f78
MacLow now buffers QoS MPDUs under Block Ack
Mirko Banchi <mk.banchi@gmail.com>
parents:
5955
diff
changeset
|
1122 |
typedef std::pair<Ptr<Packet>, WifiMacHeader> BufferedPacket; |
e9918be47f78
MacLow now buffers QoS MPDUs under Block Ack
Mirko Banchi <mk.banchi@gmail.com>
parents:
5955
diff
changeset
|
1123 |
typedef std::list<BufferedPacket>::iterator BufferedPacketI; |
e9918be47f78
MacLow now buffers QoS MPDUs under Block Ack
Mirko Banchi <mk.banchi@gmail.com>
parents:
5955
diff
changeset
|
1124 |
|
e9918be47f78
MacLow now buffers QoS MPDUs under Block Ack
Mirko Banchi <mk.banchi@gmail.com>
parents:
5955
diff
changeset
|
1125 |
typedef std::pair<Mac48Address, uint8_t> AgreementKey; |
e9918be47f78
MacLow now buffers QoS MPDUs under Block Ack
Mirko Banchi <mk.banchi@gmail.com>
parents:
5955
diff
changeset
|
1126 |
typedef std::pair<BlockAckAgreement, std::list<BufferedPacket> > AgreementValue; |
e9918be47f78
MacLow now buffers QoS MPDUs under Block Ack
Mirko Banchi <mk.banchi@gmail.com>
parents:
5955
diff
changeset
|
1127 |
|
e9918be47f78
MacLow now buffers QoS MPDUs under Block Ack
Mirko Banchi <mk.banchi@gmail.com>
parents:
5955
diff
changeset
|
1128 |
typedef std::map<AgreementKey, AgreementValue> Agreements; |
e9918be47f78
MacLow now buffers QoS MPDUs under Block Ack
Mirko Banchi <mk.banchi@gmail.com>
parents:
5955
diff
changeset
|
1129 |
typedef std::map<AgreementKey, AgreementValue>::iterator AgreementsI; |
e9918be47f78
MacLow now buffers QoS MPDUs under Block Ack
Mirko Banchi <mk.banchi@gmail.com>
parents:
5955
diff
changeset
|
1130 |
|
6606
2f2b67218332
Bug 981: use a cache to keep track of received MPDUs under block ack
Mirko Banchi <mk.banchi@gmail.com>
parents:
6599
diff
changeset
|
1131 |
typedef std::map<AgreementKey, BlockAckCache> BlockAckCaches; |
2f2b67218332
Bug 981: use a cache to keep track of received MPDUs under block ack
Mirko Banchi <mk.banchi@gmail.com>
parents:
6599
diff
changeset
|
1132 |
typedef std::map<AgreementKey, BlockAckCache>::iterator BlockAckCachesI; |
6674
52f8688d6d01
Bug 978: Run check-style.py on files touched in the reorganisation
Dean Armstrong <deanarm@gmail.com>
parents:
6673
diff
changeset
|
1133 |
|
5956
e9918be47f78
MacLow now buffers QoS MPDUs under Block Ack
Mirko Banchi <mk.banchi@gmail.com>
parents:
5955
diff
changeset
|
1134 |
Agreements m_bAckAgreements; |
6606
2f2b67218332
Bug 981: use a cache to keep track of received MPDUs under block ack
Mirko Banchi <mk.banchi@gmail.com>
parents:
6599
diff
changeset
|
1135 |
BlockAckCaches m_bAckCaches; |
6595
3289a9d91620
run check-style on mac-low.h/cc
Mirko Banchi <mk.banchi@gmail.com>
parents:
6331
diff
changeset
|
1136 |
|
6331
eee2eab36748
Bug 910: Replace AccessClass with 802.11-style AcIndex
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
1137 |
typedef std::map<AcIndex, MacLowBlockAckEventListener*> QueueListeners; |
5964
8a59a619c30e
add support to block ack tear down in MacLow
Mirko Banchi <mk.banchi@gmail.com>
parents:
5958
diff
changeset
|
1138 |
QueueListeners m_edcaListeners; |
10139 | 1139 |
bool m_ctsToSelfSupported; |
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
1140 |
}; |
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
1141 |
|
1977
4303409f3d8e
remove uneeded trailing ';'
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1964
diff
changeset
|
1142 |
} // namespace ns3 |
1922
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
1143 |
|
dd18bc29fc3c
add MacLow to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
1144 |
#endif /* MAC_LOW_H */ |