Left: | ||
Right: |
LEFT | RIGHT |
---|---|
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * Copyright (c) 2005 INRIA | 3 * Copyright (c) 2005 INRIA |
4 * | 4 * |
5 * This program is free software; you can redistribute it and/or modify | 5 * This program is free software; you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 2 as | 6 * it under the terms of the GNU General Public License version 2 as |
7 * published by the Free Software Foundation; | 7 * published by the Free Software Foundation; |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 19 matching lines...) Expand all Loading... | |
30 class DcfState; | 30 class DcfState; |
31 class DcfManager; | 31 class DcfManager; |
32 class MacTxMiddle; | 32 class MacTxMiddle; |
33 class UniformRandomVariable; | 33 class UniformRandomVariable; |
34 class CtrlBAckResponseHeader; | 34 class CtrlBAckResponseHeader; |
35 | 35 |
36 /** | 36 /** |
37 * \brief handle packet fragmentation and retransmissions. | 37 * \brief handle packet fragmentation and retransmissions. |
38 * \ingroup wifi | 38 * \ingroup wifi |
39 * | 39 * |
40 * This class implements the packet fragmentation and | 40 * This class implements the packet fragmentation and |
Tom Henderson
2018/03/31 23:27:03
Is this doxygen up to date? It seems that there i
S. Deronne
2018/04/01 15:03:51
yes, but this is still the main purpose of this cl
| |
41 * retransmission policy. It uses the ns3::MacLow and ns3::DcfManager | 41 * retransmission policy. It uses the ns3::MacLow and ns3::DcfManager |
42 * helper classes to respectively send packets and decide when | 42 * helper classes to respectively send packets and decide when |
43 * to send them. Packets are stored in a ns3::WifiMacQueue until | 43 * to send them. Packets are stored in a ns3::WifiMacQueue until |
44 * they can be sent. | 44 * they can be sent. |
45 * | 45 * |
46 * The policy currently implemented uses a simple fragmentation | 46 * The policy currently implemented uses a simple fragmentation |
47 * threshold: any packet bigger than this threshold is fragmented | 47 * threshold: any packet bigger than this threshold is fragmented |
48 * in fragments whose size is smaller than the threshold. | 48 * in fragments whose size is smaller than the threshold. |
49 * | 49 * |
50 * The retransmission policy is also very simple: every packet is | 50 * The retransmission policy is also very simple: every packet is |
51 * retransmitted until it is either successfully transmitted or | 51 * retransmitted until it is either successfully transmitted or |
52 * it has been retransmitted up until the ssrc or slrc thresholds. | 52 * it has been retransmitted up until the ssrc or slrc thresholds. |
53 * | 53 * |
54 * The rts/cts policy is similar to the fragmentation policy: when | 54 * The rts/cts policy is similar to the fragmentation policy: when |
55 * a packet is bigger than a threshold, the rts/cts protocol is used. | 55 * a packet is bigger than a threshold, the rts/cts protocol is used. |
56 */ | 56 */ |
57 | 57 |
58 class Txop : public Object | 58 class Txop : public Object |
Tom Henderson
2018/03/31 23:27:03
I wonder about the name of this object; could it b
S. Deronne
2018/04/01 15:03:51
I have to be honest, I did not like the name Txop,
| |
59 { | 59 { |
60 public: | 60 public: |
61 /// allow DcfListener class access | 61 /// allow DcfListener class access |
62 friend class DcfListener; | 62 friend class DcfListener; |
63 /// allow MacLowTransmissionListener class access | 63 /// allow MacLowTransmissionListener class access |
64 friend class MacLowTransmissionListener; | 64 friend class MacLowTransmissionListener; |
65 | 65 |
66 Txop (); | 66 Txop (); |
67 virtual ~Txop (); | 67 virtual ~Txop (); |
68 | 68 |
(...skipping 24 matching lines...) Expand all Loading... | |
93 * | 93 * |
94 * \returns true if QoS TXOP. | 94 * \returns true if QoS TXOP. |
95 */ | 95 */ |
96 virtual bool IsQosTxop () const; | 96 virtual bool IsQosTxop () const; |
97 | 97 |
98 /** | 98 /** |
99 * Set MacLow associated with this Txop. | 99 * Set MacLow associated with this Txop. |
100 * | 100 * |
101 * \param low MacLow. | 101 * \param low MacLow. |
102 */ | 102 */ |
103 void SetLow (const Ptr<MacLow> low); | 103 void SetLow (const Ptr<MacLow> low); |
Tom Henderson
2018/03/31 23:27:03
SetMacLow
S. Deronne
2018/04/01 15:03:51
OK
| |
104 /** | 104 /** |
105 * Set DcfManager this Txop is associated to. | 105 * Set DcfManager this Txop is associated to. |
106 * | 106 * |
107 * \param manager DcfManager. | 107 * \param manager DcfManager. |
108 */ | 108 */ |
109 void SetManager (const Ptr<DcfManager> manager); | 109 void SetManager (const Ptr<DcfManager> manager); |
Tom Henderson
2018/03/31 23:27:03
SetDcfManager
S. Deronne
2018/04/01 15:03:51
OK
| |
110 /** | 110 /** |
111 * Set WifiRemoteStationsManager this Txop is associated to. | 111 * Set WifiRemoteStationsManager this Txop is associated to. |
112 * | 112 * |
113 * \param remoteManager WifiRemoteStationManager. | 113 * \param remoteManager WifiRemoteStationManager. |
114 */ | 114 */ |
115 virtual void SetWifiRemoteStationManager (const Ptr<WifiRemoteStationManager> remoteManager); | 115 virtual void SetWifiRemoteStationManager (const Ptr<WifiRemoteStationManager> remoteManager); |
116 /** | 116 /** |
117 * Set MacTxMiddle this Txop is associated to. | 117 * Set MacTxMiddle this Txop is associated to. |
118 * | 118 * |
119 * \param txMiddle MacTxMiddle. | 119 * \param txMiddle MacTxMiddle. |
(...skipping 21 matching lines...) Expand all Loading... | |
141 * | 141 * |
142 * \return MacLow | 142 * \return MacLow |
143 */ | 143 */ |
144 Ptr<MacLow> GetLow (void) const; | 144 Ptr<MacLow> GetLow (void) const; |
145 | 145 |
146 /** | 146 /** |
147 * Return the packet queue associated with this Txop. | 147 * Return the packet queue associated with this Txop. |
148 * | 148 * |
149 * \return WifiMacQueue | 149 * \return WifiMacQueue |
150 */ | 150 */ |
151 Ptr<WifiMacQueue > GetQueue () const; | 151 Ptr<WifiMacQueue > GetQueue () const; |
Tom Henderson
2018/03/31 23:27:03
Set/GetWifiMacQueue
S. Deronne
2018/04/01 15:03:51
OK
| |
152 | 152 |
153 /** | 153 /** |
154 * Set the minimum contention window size. | 154 * Set the minimum contention window size. |
155 * | 155 * |
156 * \param minCw the minimum contention window size. | 156 * \param minCw the minimum contention window size. |
157 */ | 157 */ |
158 void SetMinCw (uint32_t minCw); | 158 void SetMinCw (uint32_t minCw); |
159 /** | 159 /** |
160 * Set the maximum contention window size. | 160 * Set the maximum contention window size. |
161 * | 161 * |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
203 /** | 203 /** |
204 * When a channel switching occurs, enqueued packets are removed. | 204 * When a channel switching occurs, enqueued packets are removed. |
205 */ | 205 */ |
206 virtual void NotifyChannelSwitching (void); | 206 virtual void NotifyChannelSwitching (void); |
207 /** | 207 /** |
208 * When sleep operation occurs, if there is a pending packet transmission, | 208 * When sleep operation occurs, if there is a pending packet transmission, |
209 * it will be reinserted to the front of the queue. | 209 * it will be reinserted to the front of the queue. |
210 */ | 210 */ |
211 virtual void NotifySleep (void); | 211 virtual void NotifySleep (void); |
212 /** | 212 /** |
213 * When sleep operation occurs, the queue gets cleaned up. | 213 * When off operation occurs, the queue gets cleaned up. |
214 */ | 214 */ |
215 virtual void NotifyOff (void); | 215 virtual void NotifyOff (void); |
216 /** | 216 /** |
217 * When wake up operation occurs, channel access will be restarted. | 217 * When wake up operation occurs, channel access will be restarted. |
218 */ | 218 */ |
219 virtual void NotifyWakeUp (void); | 219 virtual void NotifyWakeUp (void); |
220 /** | |
221 * When on operation occurs, channel access will be started. | |
222 */ | |
223 virtual void NotifyOn (void); | |
220 | 224 |
221 /* Event handlers */ | 225 /* Event handlers */ |
222 /** | 226 /** |
223 * \param packet packet to send. | 227 * \param packet packet to send. |
224 * \param hdr header of packet to send. | 228 * \param hdr header of packet to send. |
225 * | 229 * |
226 * Store the packet in the internal queue until it | 230 * Store the packet in the internal queue until it |
227 * can be sent safely. | 231 * can be sent safely. |
228 */ | 232 */ |
229 virtual void Queue (Ptr<const Packet> packet, const WifiMacHeader &hdr); | 233 virtual void Queue (Ptr<const Packet> packet, const WifiMacHeader &hdr); |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
441 | 445 |
442 Ptr<const Packet> m_currentPacket; //!< the current packet | 446 Ptr<const Packet> m_currentPacket; //!< the current packet |
443 WifiMacHeader m_currentHdr; //!< the current header | 447 WifiMacHeader m_currentHdr; //!< the current header |
444 MacLowTransmissionParameters m_currentParams; ///< current transmission parame ters | 448 MacLowTransmissionParameters m_currentParams; ///< current transmission parame ters |
445 uint8_t m_fragmentNumber; //!< the fragment number | 449 uint8_t m_fragmentNumber; //!< the fragment number |
446 }; | 450 }; |
447 | 451 |
448 } //namespace ns3 | 452 } //namespace ns3 |
449 | 453 |
450 #endif /* TXOP_H */ | 454 #endif /* TXOP_H */ |
LEFT | RIGHT |