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) 2008 INRIA | 3 * Copyright (c) 2008 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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 { | 148 { |
149 if (m_htSupported) | 149 if (m_htSupported) |
150 { | 150 { |
151 capabilities.SetHtSupported (1); | 151 capabilities.SetHtSupported (1); |
152 } | 152 } |
153 if (m_vhtSupported) | 153 if (m_vhtSupported) |
154 { | 154 { |
155 capabilities.SetVhtSupported (1); | 155 capabilities.SetVhtSupported (1); |
156 } | 156 } |
157 } | 157 } |
| 158 //TODO: to be completed |
158 return capabilities; | 159 return capabilities; |
159 } | 160 } |
160 | 161 |
161 HtCapabilities | 162 HtCapabilities |
162 RegularWifiMac::GetHtCapabilities (void) const | 163 RegularWifiMac::GetHtCapabilities (void) const |
163 { | 164 { |
164 NS_LOG_FUNCTION (this); | 165 NS_LOG_FUNCTION (this); |
165 HtCapabilities capabilities; | 166 HtCapabilities capabilities; |
166 if (m_htSupported) | 167 if (m_htSupported) |
167 { | 168 { |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
391 RegularWifiMac::SetBkMaxAmpduSize (uint16_t size) | 392 RegularWifiMac::SetBkMaxAmpduSize (uint16_t size) |
392 { | 393 { |
393 NS_LOG_FUNCTION (this << size); | 394 NS_LOG_FUNCTION (this << size); |
394 m_bkMaxAmpduSize = size; | 395 m_bkMaxAmpduSize = size; |
395 ConfigureAggregation (); | 396 ConfigureAggregation (); |
396 } | 397 } |
397 | 398 |
398 void | 399 void |
399 RegularWifiMac::SetVoBlockAckThreshold (uint8_t threshold) | 400 RegularWifiMac::SetVoBlockAckThreshold (uint8_t threshold) |
400 { | 401 { |
401 NS_LOG_FUNCTION (this << static_cast<uint16_t> (threshold)); | 402 NS_LOG_FUNCTION (this << +threshold); |
402 GetVOQueue ()->SetBlockAckThreshold (threshold); | 403 GetVOQueue ()->SetBlockAckThreshold (threshold); |
403 } | 404 } |
404 | 405 |
405 void | 406 void |
406 RegularWifiMac::SetViBlockAckThreshold (uint8_t threshold) | 407 RegularWifiMac::SetViBlockAckThreshold (uint8_t threshold) |
407 { | 408 { |
408 NS_LOG_FUNCTION (this << static_cast<uint16_t> (threshold)); | 409 NS_LOG_FUNCTION (this << +threshold); |
409 GetVIQueue ()->SetBlockAckThreshold (threshold); | 410 GetVIQueue ()->SetBlockAckThreshold (threshold); |
410 } | 411 } |
411 | 412 |
412 void | 413 void |
413 RegularWifiMac::SetBeBlockAckThreshold (uint8_t threshold) | 414 RegularWifiMac::SetBeBlockAckThreshold (uint8_t threshold) |
414 { | 415 { |
415 NS_LOG_FUNCTION (this << static_cast<uint16_t> (threshold)); | 416 NS_LOG_FUNCTION (this << +threshold); |
416 GetBEQueue ()->SetBlockAckThreshold (threshold); | 417 GetBEQueue ()->SetBlockAckThreshold (threshold); |
417 } | 418 } |
418 | 419 |
419 void | 420 void |
420 RegularWifiMac::SetBkBlockAckThreshold (uint8_t threshold) | 421 RegularWifiMac::SetBkBlockAckThreshold (uint8_t threshold) |
421 { | 422 { |
422 NS_LOG_FUNCTION (this << static_cast<uint16_t> (threshold)); | 423 NS_LOG_FUNCTION (this << +threshold); |
423 GetBKQueue ()->SetBlockAckThreshold (threshold); | 424 GetBKQueue ()->SetBlockAckThreshold (threshold); |
424 } | 425 } |
425 | 426 |
426 void | 427 void |
427 RegularWifiMac::SetVoBlockAckInactivityTimeout (uint16_t timeout) | 428 RegularWifiMac::SetVoBlockAckInactivityTimeout (uint16_t timeout) |
428 { | 429 { |
429 NS_LOG_FUNCTION (this << timeout); | 430 NS_LOG_FUNCTION (this << timeout); |
430 GetVOQueue ()->SetBlockAckInactivityTimeout (timeout); | 431 GetVOQueue ()->SetBlockAckInactivityTimeout (timeout); |
431 } | 432 } |
432 | 433 |
(...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
997 } | 998 } |
998 default: | 999 default: |
999 NS_FATAL_ERROR ("Unsupported Action frame received"); | 1000 NS_FATAL_ERROR ("Unsupported Action frame received"); |
1000 return; | 1001 return; |
1001 } | 1002 } |
1002 } | 1003 } |
1003 NS_FATAL_ERROR ("Don't know how to handle frame (type=" << hdr->GetType ()); | 1004 NS_FATAL_ERROR ("Don't know how to handle frame (type=" << hdr->GetType ()); |
1004 } | 1005 } |
1005 | 1006 |
1006 void | 1007 void |
1007 RegularWifiMac::DeaggregateAmsduAndForward (Ptr<Packet> aggregatedPacket, | 1008 RegularWifiMac::DeaggregateAmsduAndForward (Ptr<Packet> aggregatedPacket, const
WifiMacHeader *hdr) |
1008 const WifiMacHeader *hdr) | 1009 { |
1009 { | 1010 NS_LOG_FUNCTION (this << aggregatedPacket << hdr); |
1010 MsduAggregator::DeaggregatedMsdus packets = | 1011 MsduAggregator::DeaggregatedMsdus packets = MsduAggregator::Deaggregate (aggre
gatedPacket); |
1011 MsduAggregator::Deaggregate (aggregatedPacket); | |
1012 | |
1013 for (MsduAggregator::DeaggregatedMsdusCI i = packets.begin (); | 1012 for (MsduAggregator::DeaggregatedMsdusCI i = packets.begin (); |
1014 i != packets.end (); ++i) | 1013 i != packets.end (); ++i) |
1015 { | 1014 { |
1016 ForwardUp ((*i).first, (*i).second.GetSourceAddr (), | 1015 ForwardUp ((*i).first, (*i).second.GetSourceAddr (), |
1017 (*i).second.GetDestinationAddr ()); | 1016 (*i).second.GetDestinationAddr ()); |
1018 } | 1017 } |
1019 } | 1018 } |
1020 | 1019 |
1021 void | 1020 void |
1022 RegularWifiMac::SendAddBaResponse (const MgtAddBaRequestHeader *reqHdr, | 1021 RegularWifiMac::SendAddBaResponse (const MgtAddBaRequestHeader *reqHdr, |
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1403 { | 1402 { |
1404 NS_LOG_FUNCTION (this); | 1403 NS_LOG_FUNCTION (this); |
1405 for (EdcaQueues::const_iterator i = m_edca.begin (); i != m_edca.end (); ++i) | 1404 for (EdcaQueues::const_iterator i = m_edca.begin (); i != m_edca.end (); ++i) |
1406 { | 1405 { |
1407 i->second->SetMsduAggregator (0); | 1406 i->second->SetMsduAggregator (0); |
1408 i->second->SetMpduAggregator (0); | 1407 i->second->SetMpduAggregator (0); |
1409 } | 1408 } |
1410 } | 1409 } |
1411 | 1410 |
1412 } //namespace ns3 | 1411 } //namespace ns3 |
LEFT | RIGHT |