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,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 641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
652 void | 652 void |
653 WifiRemoteStationManager::Reset (void) | 653 WifiRemoteStationManager::Reset (void) |
654 { | 654 { |
655 for (Stations::const_iterator i = m_stations.begin (); i != m_stations.end ();
i++) | 655 for (Stations::const_iterator i = m_stations.begin (); i != m_stations.end ();
i++) |
656 { | 656 { |
657 delete (*i); | 657 delete (*i); |
658 } | 658 } |
659 m_stations.clear (); | 659 m_stations.clear (); |
660 m_basicModes.clear (); | 660 m_basicModes.clear (); |
661 m_basicModes.push_back (m_defaultTxMode); | 661 m_basicModes.push_back (m_defaultTxMode); |
662 | |
663 NS_ASSERT (m_defaultTxMode.IsMandatory ()); | 662 NS_ASSERT (m_defaultTxMode.IsMandatory ()); |
664 } | 663 } |
665 void· | 664 void· |
666 WifiRemoteStationManager::AddBasicMode (WifiMode mode) | 665 WifiRemoteStationManager::AddBasicMode (WifiMode mode) |
667 { | 666 { |
668 for (uint32_t i = 0; i < GetNBasicModes (); i++) | 667 for (uint32_t i = 0; i < GetNBasicModes (); i++) |
669 { | 668 { |
670 if (GetBasicMode (i) == mode) | 669 if (GetBasicMode (i) == mode) |
671 { | 670 { |
672 return; | 671 return; |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
776 double coefficient = CalculateAveragingCoefficient (); | 775 double coefficient = CalculateAveragingCoefficient (); |
777 m_failAvg = (1.0 - coefficient) + coefficient * m_failAvg; | 776 m_failAvg = (1.0 - coefficient) + coefficient * m_failAvg; |
778 } | 777 } |
779 | 778 |
780 double | 779 double |
781 WifiRemoteStationInfo::GetFrameErrorRate () const | 780 WifiRemoteStationInfo::GetFrameErrorRate () const |
782 { | 781 { |
783 return m_failAvg; | 782 return m_failAvg; |
784 } | 783 } |
785 } // namespace ns3 | 784 } // namespace ns3 |
LEFT | RIGHT |