|
|
| 204 |
m_calcTxTime.push_back (std::make_pair (t, mode)); |
204 |
m_calcTxTime.push_back (std::make_pair (t, mode)); |
| 205 |
} |
205 |
} |
| 206 |
|
206 |
|
| 207 |
Thresholds |
207 |
WifiRrpaaThresholds |
| 208 |
RrpaaWifiManager::GetThresholds (RrpaaWifiRemoteStation *station, WifiMode mode) const |
208 |
RrpaaWifiManager::GetThresholds (RrpaaWifiRemoteStation *station, WifiMode mode) const |
| 209 |
{ |
209 |
{ |
| 210 |
NS_LOG_FUNCTION (this << station << mode); |
210 |
NS_LOG_FUNCTION (this << station << mode); |
| 211 |
struct Thresholds threshold; |
211 |
struct WifiRrpaaThresholds threshold; |
| 212 |
for (RrpaaThresholdsTable::const_iterator i = station->m_thresholds.begin (); i != station->m_thresholds.end (); i++) |
212 |
for (RrpaaThresholdsTable::const_iterator i = station->m_thresholds.begin (); i != station->m_thresholds.end (); i++) |
| 213 |
{ |
213 |
{ |
| 214 |
if (mode == i->second) |
214 |
if (mode == i->second) |
|
|
| 303 |
{ |
303 |
{ |
| 304 |
mtl = nextMtl; |
304 |
mtl = nextMtl; |
| 305 |
} |
305 |
} |
| 306 |
Thresholds th; |
306 |
WifiRrpaaThresholds th; |
| 307 |
th.m_ewnd = ceil (m_tau / totalTxTime.GetSeconds ()); |
307 |
th.m_ewnd = ceil (m_tau / totalTxTime.GetSeconds ()); |
| 308 |
th.m_ori = ori; |
308 |
th.m_ori = ori; |
| 309 |
th.m_mtl = mtl; |
309 |
th.m_mtl = mtl; |
|
|
| 463 |
RrpaaWifiManager::RunBasicAlgorithm (RrpaaWifiRemoteStation *station) |
463 |
RrpaaWifiManager::RunBasicAlgorithm (RrpaaWifiRemoteStation *station) |
| 464 |
{ |
464 |
{ |
| 465 |
NS_LOG_FUNCTION (this << station); |
465 |
NS_LOG_FUNCTION (this << station); |
| 466 |
Thresholds thresholds = GetThresholds (station, station->m_rateIndex); |
466 |
WifiRrpaaThresholds thresholds = GetThresholds (station, station->m_rateIndex); |
| 467 |
double bploss = (double) station->m_nFailed / (double) thresholds.m_ewnd; |
467 |
double bploss = (double) station->m_nFailed / (double) thresholds.m_ewnd; |
| 468 |
double wploss = (double) (station->m_counter + station->m_nFailed) / (double) thresholds.m_ewnd; |
468 |
double wploss = (double) (station->m_counter + station->m_nFailed) / (double) thresholds.m_ewnd; |
| 469 |
NS_LOG_DEBUG ("Best loss prob= " << bploss); |
469 |
NS_LOG_DEBUG ("Best loss prob= " << bploss); |
|
|
| 595 |
} |
595 |
} |
| 596 |
} |
596 |
} |
| 597 |
|
597 |
|
| 598 |
Thresholds |
598 |
WifiRrpaaThresholds |
| 599 |
RrpaaWifiManager::GetThresholds (RrpaaWifiRemoteStation *station, |
599 |
RrpaaWifiManager::GetThresholds (RrpaaWifiRemoteStation *station, |
| 600 |
uint32_t rate) const |
600 |
uint32_t rate) const |
| 601 |
{ |
601 |
{ |