avoid calling un-implemented method

This commit is contained in:
Mathieu Lacage
2007-10-09 16:15:38 +02:00
parent 8cda08d41c
commit ec7d64d30d
2 changed files with 11 additions and 11 deletions

View File

@@ -105,18 +105,19 @@ IdealMacStation::GetDataMode (uint32_t size)
// highest snr threshold possible which is smaller than m_lastSnr
// to ensure correct packet delivery.
double maxThreshold = 0.0;
WifiMode mode = m_stations->GetDefaultMode ();
WifiMode maxMode = m_stations->GetDefaultMode ();
for (uint32_t i = 0; i < GetNSupportedModes (); i++)
{
double threshold = m_stations->GetSnrThreshold (GetSupportedMode (i));
WifiMode mode = GetSupportedMode (i);
double threshold = m_stations->GetSnrThreshold (mode);
if (threshold > maxThreshold &&
threshold < m_lastSnr)
{
maxThreshold = threshold;
mode = GetSupportedMode (i);
maxMode = mode;
}
}
return mode;
return maxMode;
}
WifiMode
IdealMacStation::GetRtsMode (void)
@@ -125,18 +126,19 @@ IdealMacStation::GetRtsMode (void)
// snr threshold possible which is smaller than m_lastSnr to
// ensure correct packet delivery.
double maxThreshold = 0.0;
WifiMode mode = m_stations->GetDefaultMode ();
for (uint32_t i = 0; i < GetNBasicModes (); i++)
WifiMode maxMode = m_stations->GetDefaultMode ();
for (uint32_t i = 0; i < m_stations->GetNBasicModes (); i++)
{
double threshold = m_stations->GetSnrThreshold (GetBasicMode (i));
WifiMode mode = m_stations->GetBasicMode (i);
double threshold = m_stations->GetSnrThreshold (mode);
if (threshold > maxThreshold &&
threshold < m_lastSnr)
{
maxThreshold = threshold;
mode = GetBasicMode (i);
maxMode = mode;
}
}
return mode;
return maxMode;
}
IdealMacStations *
IdealMacStation::GetStations (void) const

View File

@@ -111,9 +111,7 @@ private:
virtual MacStations *GetStations (void) const = 0;
protected:
uint32_t GetNSupportedModes (void) const;
uint32_t GetNBasicModes (void) const;
WifiMode GetSupportedMode (uint32_t i) const;
WifiMode GetBasicMode (uint32_t i) const;
private:
bool IsIn (WifiMode mode) const;
WifiMode GetControlAnswerMode (WifiMode reqMode);