Left: | ||
Right: |
OLD | NEW |
---|---|
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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
58 | 58 |
59 class DcaTxop : public Object | 59 class DcaTxop : public Object |
60 { | 60 { |
61 public: | 61 public: |
62 friend class DcfListener; | 62 friend class DcfListener; |
63 friend class MacLowTransmissionListener; | 63 friend class MacLowTransmissionListener; |
64 | 64 |
65 DcaTxop (); | 65 DcaTxop (); |
66 virtual ~DcaTxop (); | 66 virtual ~DcaTxop (); |
67 | 67 |
68 /** | |
69 * \brief Get the type ID. | |
70 * \return the object TypeId | |
71 */ | |
68 static TypeId GetTypeId (void); | 72 static TypeId GetTypeId (void); |
69 | 73 |
70 /** | 74 /** |
71 * typedef for a callback to invoke when a | 75 * typedef for a callback to invoke when a |
72 * packet transmission was completed successfully. | 76 * packet transmission was completed successfully. |
73 */ | 77 */ |
74 typedef Callback <void, const WifiMacHeader&> TxOk; | 78 typedef Callback <void, const WifiMacHeader&> TxOk; |
75 /** | 79 /** |
76 * typedef for a callback to invoke when a | 80 * typedef for a callback to invoke when a |
77 * packet transmission was failed. | 81 * packet transmission was failed. |
78 */ | 82 */ |
79 typedef Callback <void, const WifiMacHeader&> TxFailed; | 83 typedef Callback <void, const WifiMacHeader&> TxFailed; |
80 | 84 |
85 /** | |
86 * Check for EDCA. | |
87 * | |
88 * \returns true if EDCA. | |
89 */ | |
81 virtual bool IsEdca (); | 90 virtual bool IsEdca (); |
82 | 91 |
83 /** | 92 /** |
84 * Set MacLow associated with this DcaTxop. | 93 * Set MacLow associated with this DcaTxop. |
85 * | 94 * |
86 * \param low MacLow. | 95 * \param low MacLow. |
87 */ | 96 */ |
88 virtual void SetLow (Ptr<MacLow> low); | 97 virtual void SetLow (Ptr<MacLow> low); |
89 /** | 98 /** |
90 * Set DcfManager this DcaTxop is associated to. | 99 * Set DcfManager this DcaTxop is associated to. |
(...skipping 21 matching lines...) Expand all Loading... | |
112 virtual void SetTxOkCallback (TxOk callback); | 121 virtual void SetTxOkCallback (TxOk callback); |
113 /** | 122 /** |
114 * \param callback the callback to invoke when a | 123 * \param callback the callback to invoke when a |
115 * packet transmission was completed unsuccessfully. | 124 * packet transmission was completed unsuccessfully. |
116 */ | 125 */ |
117 virtual void SetTxFailedCallback (TxFailed callback); | 126 virtual void SetTxFailedCallback (TxFailed callback); |
118 | 127 |
119 /** | 128 /** |
120 * Return the MacLow associated with this DcaTxop. | 129 * Return the MacLow associated with this DcaTxop. |
121 * | 130 * |
122 * \return MacLow. | 131 * \return MacLow |
123 */ | 132 */ |
124 Ptr<MacLow> GetLow (void) const; | 133 Ptr<MacLow> GetLow (void) const; |
125 | 134 |
126 /** | 135 /** |
127 * Return the packet queue associated with this DcaTxop. | 136 * Return the packet queue associated with this DcaTxop. |
128 * | 137 * |
129 * \return WifiMacQueue. | 138 * \return WifiMacQueue |
130 */ | 139 */ |
131 Ptr<WifiMacQueue > GetQueue () const; | 140 Ptr<WifiMacQueue > GetQueue () const; |
132 | 141 |
133 /** | 142 /** |
134 * Set the minimum contention window size. | 143 * Set the minimum contention window size. |
135 * | 144 * |
136 * \param minCw the minimum contention window size. | 145 * \param minCw the minimum contention window size. |
137 */ | 146 */ |
138 void SetMinCw (uint32_t minCw); | 147 void SetMinCw (uint32_t minCw); |
139 /** | 148 /** |
140 * Set the maximum contention window size. | 149 * Set the maximum contention window size. |
141 * | 150 * |
142 * \param maxCw the maximum contention window size. | 151 * \param maxCw the maximum contention window size. |
143 */ | 152 */ |
144 void SetMaxCw (uint32_t maxCw); | 153 void SetMaxCw (uint32_t maxCw); |
145 /** | 154 /** |
146 * Set the number of slots that make up an AIFS. | 155 * Set the number of slots that make up an AIFS. |
147 * | 156 * |
148 * \param aifsn the number of slots that make up an AIFS. | 157 * \param aifsn the number of slots that make up an AIFS. |
149 */ | 158 */ |
150 void SetAifsn (uint32_t aifsn); | 159 void SetAifsn (uint32_t aifsn); |
151 /* | 160 /** |
152 * Set the TXOP limit. | 161 * Set the TXOP limit. |
153 * | 162 * |
154 * \param txopLimit the TXOP limit. | 163 * \param txopLimit the TXOP limit. |
155 * Value zero corresponds to default DCF. | 164 * Value zero corresponds to default DCF. |
156 */ | 165 */ |
157 void SetTxopLimit (Time txopLimit); | 166 void SetTxopLimit (Time txopLimit); |
158 /** | 167 /** |
159 * Return the minimum contention window size. | 168 * Return the minimum contention window size. |
160 * | 169 * |
161 * \return the minimum contention window size. | 170 * \return the minimum contention window size. |
(...skipping 25 matching lines...) Expand all Loading... | |
187 /** | 196 /** |
188 * When sleep operation occurs, if there is a pending packet transmission, | 197 * When sleep operation occurs, if there is a pending packet transmission, |
189 * it will be reinserted to the front of the queue. | 198 * it will be reinserted to the front of the queue. |
190 */ | 199 */ |
191 virtual void NotifySleep (void); | 200 virtual void NotifySleep (void); |
192 /** | 201 /** |
193 * When wake up operation occurs, channel access will be restarted. | 202 * When wake up operation occurs, channel access will be restarted. |
194 */ | 203 */ |
195 virtual void NotifyWakeUp (void); | 204 virtual void NotifyWakeUp (void); |
196 | 205 |
206 /* Event handlers */ | |
197 /** | 207 /** |
198 * \param packet packet to send. | 208 * \param packet packet to send. |
199 * \param hdr header of packet to send. | 209 * \param hdr header of packet to send. |
200 * | 210 * |
201 * Store the packet in the internal queue until it | 211 * Store the packet in the internal queue until it |
202 * can be sent safely. | 212 * can be sent safely. |
203 */ | 213 */ |
204 virtual void Queue (Ptr<const Packet> packet, const WifiMacHeader &hdr); | 214 virtual void Queue (Ptr<const Packet> packet, const WifiMacHeader &hdr); |
205 | 215 |
206 /* Event handlers */ | 216 /* Event handlers */ |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
243 /** | 253 /** |
244 * Start transmission for the next packet if allowed by the TxopLimit. | 254 * Start transmission for the next packet if allowed by the TxopLimit. |
245 */ | 255 */ |
246 virtual void StartNextPacket (void); | 256 virtual void StartNextPacket (void); |
247 /** | 257 /** |
248 * Event handler when a transmission that | 258 * Event handler when a transmission that |
249 * does not require an ACK has completed. | 259 * does not require an ACK has completed. |
250 */ | 260 */ |
251 virtual void EndTxNoAck (void); | 261 virtual void EndTxNoAck (void); |
252 | 262 |
253 /* | 263 /** |
254 * Check if the station has TXOP granted for the next MPDU. | 264 * Check if the station has TXOP granted for the next MPDU. |
255 * | 265 * |
256 * \return true if the station has TXOP granted for the next MPDU, | 266 * \return true if the station has TXOP granted for the next MPDU, |
257 * false otherwise | 267 * false otherwise |
258 */ | 268 */ |
259 virtual bool HasTxop (void) const; | 269 virtual bool HasTxop (void) const; |
260 | 270 |
261 /** | 271 /** |
262 * Assign a fixed random variable stream number to the random variables | 272 * Assign a fixed random variable stream number to the random variables |
263 * used by this model. Return the number of streams (possibly zero) that | 273 * used by this model. Return the number of streams (possibly zero) that |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
368 */ | 378 */ |
369 virtual uint32_t GetFragmentOffset (void) const; | 379 virtual uint32_t GetFragmentOffset (void) const; |
370 /** | 380 /** |
371 * Check if the current fragment is the last fragment. | 381 * Check if the current fragment is the last fragment. |
372 * | 382 * |
373 * \return true if the current fragment is the last fragment, | 383 * \return true if the current fragment is the last fragment, |
374 * false otherwise. | 384 * false otherwise. |
375 */ | 385 */ |
376 virtual bool IsLastFragment (void) const; | 386 virtual bool IsLastFragment (void) const; |
377 | 387 |
378 DcfState *m_dcf; | 388 DcfState *m_dcf; //!< the DCF state |
379 DcfManager *m_manager; | 389 DcfManager *m_manager; //!< the DCF manager |
380 TxOk m_txOkCallback; | 390 TxOk m_txOkCallback; //!< the transmit OK callback |
381 TxFailed m_txFailedCallback; | 391 TxFailed m_txFailedCallback; //!< the transmit failed callback |
382 Ptr<WifiMacQueue> m_queue; | 392 Ptr<WifiMacQueue> m_queue; //!< the wifi MAC queue |
383 MacTxMiddle *m_txMiddle; | 393 MacTxMiddle *m_txMiddle; //!< the MAC transmit middle |
S. Deronne
2017/02/11 18:22:34
the MacTxMiddle
| |
384 Ptr <MacLow> m_low; | 394 Ptr <MacLow> m_low; //!< the MAC low |
S. Deronne
2017/02/11 18:22:33
the MacLow
| |
385 Ptr<WifiRemoteStationManager> m_stationManager; | 395 Ptr<WifiRemoteStationManager> m_stationManager; //!< the wifi remote station m anager |
386 RandomStream *m_rng; | 396 RandomStream *m_rng; //!< the random stream |
387 | 397 |
388 Ptr<const Packet> m_currentPacket; | 398 Ptr<const Packet> m_currentPacket; //!< the current packet |
389 WifiMacHeader m_currentHdr; | 399 WifiMacHeader m_currentHdr; //!< the current header |
390 MacLowTransmissionParameters m_currentParams; | 400 MacLowTransmissionParameters m_currentParams; ///< current transmission parame ters |
391 uint8_t m_fragmentNumber; | 401 uint8_t m_fragmentNumber; //!< the fragment number |
392 }; | 402 }; |
393 | 403 |
394 } //namespace ns3 | 404 } //namespace ns3 |
395 | 405 |
396 #endif /* DCA_TXOP_H */ | 406 #endif /* DCA_TXOP_H */ |
OLD | NEW |