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,2006,2007 INRIA | 3 * Copyright (c) 2005,2006,2007 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 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
552 * received frame, unless they conflict with the requirement to use· | 552 * received frame, unless they conflict with the requirement to use· |
553 * the BSSBasicRateSet parameter. | 553 * the BSSBasicRateSet parameter. |
554 */ | 554 */ |
555 WifiMode mode = GetDefaultMode (); | 555 WifiMode mode = GetDefaultMode (); |
556 | 556 |
557 // First, search the BSS Basic Rate set | 557 // First, search the BSS Basic Rate set |
558 for (WifiRemoteStationManager::BasicModesIterator i = BeginBasicModes (); i !=
EndBasicModes (); i++) | 558 for (WifiRemoteStationManager::BasicModesIterator i = BeginBasicModes (); i !=
EndBasicModes (); i++) |
559 { | 559 { |
560 if (i->GetPhyRate () > mode.GetPhyRate () && | 560 if (i->GetPhyRate () > mode.GetPhyRate () && |
561 i->GetPhyRate () <= reqMode.GetPhyRate () && | 561 i->GetPhyRate () <= reqMode.GetPhyRate () && |
562 i->GetModulationType () == reqMode.GetModulationType ()) | 562 i->GetModulationClass () == reqMode.GetModulationClass ()) |
563 { | 563 { |
564 mode = *i; | 564 mode = *i; |
565 } | 565 } |
566 } | 566 } |
567 // no need to search Mandatory rate set because it is included | 567 // no need to search Mandatory rate set because it is included |
568 // within the Basic rate set. | 568 // within the Basic rate set. |
569 return mode; | 569 return mode; |
570 } | 570 } |
571 | 571 |
572 WifiMode | 572 WifiMode |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
775 double coefficient = CalculateAveragingCoefficient (); | 775 double coefficient = CalculateAveragingCoefficient (); |
776 m_failAvg = (1.0 - coefficient) + coefficient * m_failAvg; | 776 m_failAvg = (1.0 - coefficient) + coefficient * m_failAvg; |
777 } | 777 } |
778 | 778 |
779 double | 779 double |
780 WifiRemoteStationInfo::GetFrameErrorRate () const | 780 WifiRemoteStationInfo::GetFrameErrorRate () const |
781 { | 781 { |
782 return m_failAvg; | 782 return m_failAvg; |
783 } | 783 } |
784 } // namespace ns3 | 784 } // namespace ns3 |
OLD | NEW |