wifi: Use uint8_t for the number of supported rates

This commit is contained in:
Sébastien Deronne
2018-02-17 20:53:52 +01:00
parent 45442cf410
commit 69cd760649
18 changed files with 48 additions and 88 deletions

View File

@@ -45,7 +45,7 @@ struct AarfWifiRemoteStation : public WifiRemoteStation
uint32_t m_retry; ///< retry
uint32_t m_timerTimeout; ///< timer timeout
uint32_t m_successThreshold; ///< success threshold
uint32_t m_rate; ///< rate
uint8_t m_rate; ///< rate
};
NS_OBJECT_ENSURE_REGISTERED (AarfWifiManager);

View File

@@ -47,7 +47,7 @@ struct AarfcdWifiRemoteStation : public WifiRemoteStation
uint32_t m_retry; ///< retry
uint32_t m_successThreshold; ///< success threshold
uint32_t m_timerTimeout; ///< timer timeout
uint32_t m_rate; ///< rate
uint8_t m_rate; ///< rate
bool m_rtsOn; ///< RTS on
uint32_t m_rtsWnd; ///< RTS window
uint32_t m_rtsCounter; ///< RTS counter

View File

@@ -43,7 +43,7 @@ struct AmrrWifiRemoteStation : public WifiRemoteStation
uint32_t m_tx_err; ///< transmit error
uint32_t m_tx_retr; ///< transmit retry
uint32_t m_retry; ///< retry
uint32_t m_txrate; ///< transmit rate
uint8_t m_txrate; ///< transmit rate
uint32_t m_successThreshold; ///< success threshold
uint32_t m_success; ///< success
bool m_recovery; ///< recovery
@@ -253,7 +253,7 @@ AmrrWifiManager::UpdateMode (AmrrWifiRemoteStation *station)
station->m_success++;
NS_LOG_DEBUG ("++ success=" << station->m_success << " successThreshold=" << station->m_successThreshold <<
" tx_ok=" << station->m_tx_ok << " tx_err=" << station->m_tx_err << " tx_retr=" << station->m_tx_retr <<
" rate=" << station->m_txrate << " n-supported-rates=" << GetNSupported (station));
" rate=" << static_cast<uint16_t>(station->m_txrate) << " n-supported-rates=" << static_cast<uint16_t>(GetNSupported (station)));
if (station->m_success >= station->m_successThreshold
&& !IsMaxRate (station))
{
@@ -272,7 +272,7 @@ AmrrWifiManager::UpdateMode (AmrrWifiRemoteStation *station)
station->m_success = 0;
NS_LOG_DEBUG ("-- success=" << station->m_success << " successThreshold=" << station->m_successThreshold <<
" tx_ok=" << station->m_tx_ok << " tx_err=" << station->m_tx_err << " tx_retr=" << station->m_tx_retr <<
" rate=" << station->m_txrate << " n-supported-rates=" << GetNSupported (station));
" rate=" << static_cast<uint16_t>(station->m_txrate) << " n-supported-rates=" << static_cast<uint16_t>(GetNSupported (station)));
if (!IsMinRate (station))
{
if (station->m_recovery)
@@ -308,7 +308,7 @@ AmrrWifiManager::DoGetDataTxVector (WifiRemoteStation *st)
AmrrWifiRemoteStation *station = (AmrrWifiRemoteStation *)st;
UpdateMode (station);
NS_ASSERT (station->m_txrate < GetNSupported (station));
uint32_t rateIndex;
uint8_t rateIndex;
if (station->m_retry < 1)
{
rateIndex = station->m_txrate;

View File

@@ -43,9 +43,9 @@ AparfWifiRemoteStation : public WifiRemoteStation
uint32_t m_pCount; //!< Number of power changes.
uint32_t m_successThreshold; //!< The minimum number of successful transmissions to try a new power or rate.
uint32_t m_failThreshold; //!< The minimum number of failed transmissions to try a new power or rate.
uint32_t m_prevRateIndex; //!< Rate index of the previous transmission.
uint32_t m_rateIndex; //!< Current rate index.
uint32_t m_critRateIndex; //!< Critical rate.
uint8_t m_prevRateIndex; //!< Rate index of the previous transmission.
uint8_t m_rateIndex; //!< Current rate index.
uint8_t m_critRateIndex; //!< Critical rate.
uint8_t m_prevPowerLevel; //!< Power level of the previous transmission.
uint8_t m_powerLevel; //!< Current power level.
uint32_t m_nSupported; //!< Number of supported rates by the remote station.
@@ -96,12 +96,12 @@ AparfWifiManager::GetTypeId (void)
"Step size for decrement the rate.",
UintegerValue (1),
MakeUintegerAccessor (&AparfWifiManager::m_rateDec),
MakeUintegerChecker<uint32_t> ())
MakeUintegerChecker<uint8_t> ())
.AddAttribute ("RateIncrementStep",
"Step size for increment the rate.",
UintegerValue (1),
MakeUintegerAccessor (&AparfWifiManager::m_rateInc),
MakeUintegerChecker<uint32_t> ())
MakeUintegerChecker<uint8_t> ())
.AddTraceSource ("PowerChange",
"The transmission power has change",
MakeTraceSourceAccessor (&AparfWifiManager::m_powerChange),
@@ -146,8 +146,8 @@ AparfWifiManager::DoCreateStation (void) const
station->m_aparfState = AparfWifiManager::High;
station->m_initialized = false;
NS_LOG_DEBUG ("create station=" << station << ", rate=" << station->m_rateIndex
<< ", power=" << (int)station->m_powerLevel);
NS_LOG_DEBUG ("create station=" << station << ", rate=" << static_cast<uint16_t>(station->m_rateIndex)
<< ", power=" << static_cast<uint16_t>(station->m_powerLevel));
return station;
}
@@ -244,7 +244,7 @@ AparfWifiManager::DoReportDataOk (WifiRemoteStation *st, double ackSnr,
CheckInit (station);
station->m_nSuccess++;
station->m_nFailed = 0;
NS_LOG_DEBUG ("station=" << station << " data ok success=" << station->m_nSuccess << ", rate=" << station->m_rateIndex << ", power=" << (int)station->m_powerLevel);
NS_LOG_DEBUG ("station=" << station << " data ok success=" << station->m_nSuccess << ", rate=" << static_cast<uint16_t>(station->m_rateIndex) << ", power=" << static_cast<uint16_t>(station->m_powerLevel));
if ((station->m_aparfState == AparfWifiManager::High) && (station->m_nSuccess >= station->m_successThreshold))
{

View File

@@ -99,8 +99,8 @@ private:
uint32_t m_powerMax; //!< The maximum number of power changes.
uint8_t m_powerInc; //!< Step size for increment the power.
uint8_t m_powerDec; //!< Step size for decrement the power.
uint32_t m_rateInc; //!< Step size for increment the rate.
uint32_t m_rateDec; //!< Step size for decrement the rate.
uint8_t m_rateInc; //!< Step size for increment the rate.
uint8_t m_rateDec; //!< Step size for decrement the rate.
/**
* Minimal power level.

View File

@@ -43,7 +43,7 @@ struct ArfWifiRemoteStation : public WifiRemoteStation
uint32_t m_retry; ///< retry count
uint32_t m_timerTimeout; ///< timer timeout
uint32_t m_successThreshold; ///< success threshold
uint32_t m_rate; ///< rate
uint8_t m_rate; ///< rate
};
NS_OBJECT_ENSURE_REGISTERED (ArfWifiManager);

View File

@@ -39,7 +39,7 @@ struct CaraWifiRemoteStation : public WifiRemoteStation
uint32_t m_timer; ///< timer count
uint32_t m_success; ///< success count
uint32_t m_failed; ///< failed count
uint32_t m_rate; ///< rate
uint8_t m_rate; ///< rate
};
NS_OBJECT_ENSURE_REGISTERED (CaraWifiManager);
@@ -161,7 +161,7 @@ CaraWifiManager::DoReportDataOk (WifiRemoteStation *st,
{
station->m_rate++;
}
NS_LOG_DEBUG ("self=" << station << " inc rate=" << station->m_rate);
NS_LOG_DEBUG ("self=" << station << " inc rate=" << static_cast<uint16_t>(station->m_rate));
station->m_timer = 0;
station->m_success = 0;
}

View File

@@ -327,7 +327,6 @@ Time
MinstrelHtWifiManager::CalculateFirstMpduTxDuration (Ptr<WifiPhy> phy, uint8_t streams, uint8_t sgi, uint8_t chWidth, WifiMode mode)
{
NS_LOG_FUNCTION (this << phy << static_cast<uint16_t> (streams) << static_cast<uint16_t> (sgi) << static_cast<uint16_t> (chWidth) << mode);
WifiTxVector txvector;
txvector.SetNss (streams);
txvector.SetGuardInterval (sgi ? 400 : 800);
@@ -343,7 +342,6 @@ Time
MinstrelHtWifiManager::CalculateMpduTxDuration (Ptr<WifiPhy> phy, uint8_t streams, uint8_t sgi, uint8_t chWidth, WifiMode mode)
{
NS_LOG_FUNCTION (this << phy << static_cast<uint16_t> (streams) << static_cast<uint16_t> (sgi) << static_cast<uint16_t> (chWidth) << mode);
WifiTxVector txvector;
txvector.SetNss (streams);
txvector.SetGuardInterval (sgi ? 400 : 800);
@@ -359,7 +357,6 @@ Time
MinstrelHtWifiManager::GetFirstMpduTxTime (uint32_t groupId, WifiMode mode) const
{
NS_LOG_FUNCTION (this << groupId << mode);
for (TxTime::const_iterator i = m_minstrelGroups[groupId].ratesFirstMpduTxTimeTable.begin (); i != m_minstrelGroups[groupId].ratesFirstMpduTxTimeTable.end (); i++)
{
if (mode == i->second)
@@ -375,7 +372,6 @@ void
MinstrelHtWifiManager::AddFirstMpduTxTime (uint32_t groupId, WifiMode mode, Time t)
{
NS_LOG_FUNCTION (this << groupId << mode << t);
m_minstrelGroups[groupId].ratesFirstMpduTxTimeTable.push_back (std::make_pair (t, mode));
}
@@ -383,7 +379,6 @@ Time
MinstrelHtWifiManager::GetMpduTxTime (uint32_t groupId, WifiMode mode) const
{
NS_LOG_FUNCTION (this << groupId << mode);
for (TxTime::const_iterator i = m_minstrelGroups[groupId].ratesTxTimeTable.begin (); i != m_minstrelGroups[groupId].ratesTxTimeTable.end (); i++)
{
if (mode == i->second)
@@ -399,7 +394,6 @@ void
MinstrelHtWifiManager::AddMpduTxTime (uint32_t groupId, WifiMode mode, Time t)
{
NS_LOG_FUNCTION (this << groupId << mode << t);
m_minstrelGroups[groupId].ratesTxTimeTable.push_back (std::make_pair (t, mode));
}
@@ -407,7 +401,6 @@ WifiRemoteStation *
MinstrelHtWifiManager::DoCreateStation (void) const
{
NS_LOG_FUNCTION (this);
MinstrelHtWifiRemoteStation *station = new MinstrelHtWifiRemoteStation ();
// Initialize variables common to both stations.
@@ -461,7 +454,6 @@ void
MinstrelHtWifiManager::CheckInit (MinstrelHtWifiRemoteStation *station)
{
NS_LOG_FUNCTION (this << station);
// Note: we appear to be doing late initialization of the table
// to make sure that the set of supported rates has been initialized
// before we perform our own initialization.
@@ -503,11 +495,9 @@ MinstrelHtWifiManager::CheckInit (MinstrelHtWifiRemoteStation *station)
}
void
MinstrelHtWifiManager::DoReportRxOk (WifiRemoteStation *st,
double rxSnr, WifiMode txMode)
MinstrelHtWifiManager::DoReportRxOk (WifiRemoteStation *st, double rxSnr, WifiMode txMode)
{
NS_LOG_FUNCTION (this << st);
NS_LOG_DEBUG ("DoReportRxOk m_txrate=" << ((MinstrelHtWifiRemoteStation *)st)->m_txrate);
}
@@ -515,15 +505,12 @@ void
MinstrelHtWifiManager::DoReportRtsFailed (WifiRemoteStation *st)
{
NS_LOG_FUNCTION (this << st);
MinstrelHtWifiRemoteStation *station = (MinstrelHtWifiRemoteStation *)st;
CheckInit (station);
if (!station->m_initialized)
{
return;
}
NS_LOG_DEBUG ("DoReportRtsFailed m_txrate=" << station->m_txrate);
station->m_shortRetry++;
}
@@ -532,7 +519,6 @@ void
MinstrelHtWifiManager::DoReportRtsOk (WifiRemoteStation *st, double ctsSnr, WifiMode ctsMode, double rtsSnr)
{
NS_LOG_FUNCTION (this << st);
NS_LOG_DEBUG ("self=" << st << " rts ok");
}
@@ -540,16 +526,13 @@ void
MinstrelHtWifiManager::DoReportFinalRtsFailed (WifiRemoteStation *st)
{
NS_LOG_FUNCTION (this << st);
MinstrelHtWifiRemoteStation *station = (MinstrelHtWifiRemoteStation *)st;
NS_LOG_DEBUG ("Final RTS failed");
CheckInit (station);
if (!station->m_initialized)
{
return;
}
UpdateRetry (station);
}
@@ -557,7 +540,6 @@ void
MinstrelHtWifiManager::DoReportDataFailed (WifiRemoteStation *st)
{
NS_LOG_FUNCTION (this << st);
MinstrelHtWifiRemoteStation *station = (MinstrelHtWifiRemoteStation *)st;
CheckInit (station);
@@ -577,14 +559,12 @@ MinstrelHtWifiManager::DoReportDataFailed (WifiRemoteStation *st)
uint32_t rateId = GetRateId (station->m_txrate);
uint32_t groupId = GetGroupId (station->m_txrate);
station->m_groupsTable[groupId].m_ratesTable[rateId].numRateAttempt++; // Increment the attempts counter for the rate used.
UpdateRate (station);
}
}
void
MinstrelHtWifiManager::DoReportDataOk (WifiRemoteStation *st,
double ackSnr, WifiMode ackMode, double dataSnr)
MinstrelHtWifiManager::DoReportDataOk (WifiRemoteStation *st, double ackSnr, WifiMode ackMode, double dataSnr)
{
NS_LOG_FUNCTION (this << st << ackSnr << ackMode << dataSnr);
MinstrelHtWifiRemoteStation *station = (MinstrelHtWifiRemoteStation *) st;
@@ -851,7 +831,6 @@ MinstrelHtWifiManager::UpdateRetry (MinstrelHtWifiRemoteStation *station)
NS_LOG_FUNCTION (this << station);
station->m_shortRetry = 0;
station->m_longRetry = 0;
}
void
@@ -876,8 +855,8 @@ MinstrelHtWifiManager::UpdatePacketCounters (MinstrelHtWifiRemoteStation *statio
station->m_sampleTries = 1;
station->m_sampleCount--;
}
}
void
MinstrelHtWifiManager::DoDisposeStation (WifiRemoteStation *st)
{
@@ -1816,7 +1795,6 @@ uint32_t
MinstrelHtWifiManager::GetRateId (uint32_t index)
{
NS_LOG_FUNCTION (this << index);
uint32_t id;
id = index % m_numRates;
return id;
@@ -1826,7 +1804,6 @@ uint32_t
MinstrelHtWifiManager::GetGroupId (uint32_t index)
{
NS_LOG_FUNCTION (this << index);
return index / m_numRates;
}
@@ -1877,7 +1854,6 @@ MinstrelHtWifiManager::GetLowestIndex (MinstrelHtWifiRemoteStation *station, uin
return GetIndex (groupId, rateId);
}
WifiModeList
MinstrelHtWifiManager::GetVhtDeviceMcsList (void) const
{
@@ -1921,8 +1897,3 @@ MinstrelHtWifiManager::SetHeSupported (bool enable)
}
} // namespace ns3

View File

@@ -425,9 +425,7 @@ MinstrelWifiManager::FindRate (MinstrelWifiRemoteStation *station)
return 0;
}
uint8_t idx;
uint32_t idx = 0;
NS_LOG_DEBUG ("Total: " << station->m_totalPacketsCount << " Sample: " << station->m_samplePacketsCount << " Deferred: " << station->m_numSamplesDeferred);
int delta = (station->m_totalPacketsCount * m_lookAroundRate / 100) - (station->m_samplePacketsCount + station->m_numSamplesDeferred / 2);

View File

@@ -92,7 +92,7 @@ struct MinstrelWifiRemoteStation : public WifiRemoteStation
uint32_t m_maxTpRate; ///< the current throughput rate
uint32_t m_maxTpRate2; ///< second highest throughput rate
uint32_t m_maxProbRate; ///< rate with highest prob of success
uint32_t m_nModes; ///< number of modes supported
uint8_t m_nModes; ///< number of modes supported
int m_totalPacketsCount; ///< total number of packets as of now
int m_samplePacketsCount; ///< how many packets we have sample so far
int m_numSamplesDeferred; ///< number samles deferred

View File

@@ -44,7 +44,7 @@ struct OnoeWifiRemoteStation : public WifiRemoteStation
uint32_t m_tx_err; ///< transmit error
uint32_t m_tx_retr; ///< transmit retr
uint32_t m_tx_upper; ///< transmit upper
uint32_t m_txrate; ///< transmit rate
uint8_t m_txrate; ///< transmit rate
};
NS_OBJECT_ENSURE_REGISTERED (OnoeWifiManager);
@@ -175,7 +175,7 @@ OnoeWifiManager::UpdateMode (OnoeWifiRemoteStation *station)
*/
int dir = 0, enough;
uint32_t nrate;
uint8_t nrate;
enough = (station->m_tx_ok + station->m_tx_err >= 10);
/* no packet reached -> down */
@@ -249,7 +249,7 @@ OnoeWifiManager::DoGetDataTxVector (WifiRemoteStation *st)
OnoeWifiRemoteStation *station = (OnoeWifiRemoteStation *)st;
UpdateMode (station);
NS_ASSERT (station->m_txrate < GetNSupported (station));
uint32_t rateIndex;
uint8_t rateIndex;
if (station->m_longRetry < 4)
{
rateIndex = station->m_txrate;

View File

@@ -43,11 +43,11 @@ struct ParfWifiRemoteStation : public WifiRemoteStation
bool m_usingRecoveryRate; //!< If using recovery rate.
bool m_usingRecoveryPower; //!< If using recovery power.
uint32_t m_nRetry; //!< Number of transmission retries.
uint32_t m_prevRateIndex; //!< Rate index of the previous transmission.
uint32_t m_rateIndex; //!< Current rate index used by the remote station.
uint8_t m_prevPowerLevel; //!< Power level of the previous transmission.
uint8_t m_prevRateIndex; //!< Rate index of the previous transmission.
uint8_t m_rateIndex; //!< Current rate index used by the remote station.
uint8_t m_prevPowerLevel; //!< Power level of the previous transmission.
uint8_t m_powerLevel; //!< Current power level used by the remote station.
uint32_t m_nSupported; //!< Number of supported rates by the remote station.
uint8_t m_nSupported; //!< Number of supported rates by the remote station.
bool m_initialized; //!< For initializing variables.
};
@@ -115,7 +115,7 @@ ParfWifiManager::DoCreateStation (void) const
station->m_nAttempt = 0;
NS_LOG_DEBUG ("create station=" << station << ", timer=" << station->m_nAttempt
<< ", rate=" << station->m_rateIndex << ", power=" << (int)station->m_powerLevel);
<< ", rate=" << static_cast<uint16_t>(station->m_rateIndex) << ", power=" << static_cast<uint16_t>(station->m_powerLevel));
return station;
}
@@ -167,7 +167,7 @@ ParfWifiManager::DoReportDataFailed (WifiRemoteStation *st)
station->m_nSuccess = 0;
NS_LOG_DEBUG ("station=" << station << " data fail retry=" << station->m_nRetry << ", timer=" << station->m_nAttempt
<< ", rate=" << station->m_rateIndex << ", power=" << (int)station->m_powerLevel);
<< ", rate=" << static_cast<uint16_t>(station->m_rateIndex) << ", power=" << static_cast<uint16_t>(station->m_powerLevel));
if (station->m_usingRecoveryRate)
{
NS_ASSERT (station->m_nRetry >= 1);
@@ -251,7 +251,7 @@ void ParfWifiManager::DoReportDataOk (WifiRemoteStation *st,
station->m_usingRecoveryRate = false;
station->m_usingRecoveryPower = false;
station->m_nRetry = 0;
NS_LOG_DEBUG ("station=" << station << " data ok success=" << station->m_nSuccess << ", timer=" << station->m_nAttempt << ", rate=" << station->m_rateIndex << ", power=" << (int)station->m_powerLevel);
NS_LOG_DEBUG ("station=" << station << " data ok success=" << station->m_nSuccess << ", timer=" << station->m_nAttempt << ", rate=" << static_cast<uint16_t>(station->m_rateIndex) << ", power=" << static_cast<uint16_t>(station->m_powerLevel));
if ((station->m_nSuccess == m_successThreshold
|| station->m_nAttempt == m_attemptThreshold)
&& (station->m_rateIndex < (station->m_state->m_operationalRateSet.size () - 1)))

View File

@@ -48,9 +48,7 @@ struct RraaWifiRemoteStation : public WifiRemoteStation
bool m_adaptiveRtsOn; //!< Check if Adaptive RTS mechanism is on.
bool m_lastFrameFail; //!< Flag if the last frame sent has failed.
bool m_initialized; //!< For initializing variables.
uint8_t m_nRate; //!< Number of supported rates.
uint8_t m_rateIndex; //!< Current rate index.
RraaThresholdsTable m_thresholds; //!< RRAA thresholds for this station.
@@ -452,10 +450,9 @@ RraaWifiManager::ARts (RraaWifiRemoteStation *station)
}
WifiRraaThresholds
RraaWifiManager::GetThresholds (RraaWifiRemoteStation *station,
uint32_t rate) const
RraaWifiManager::GetThresholds (RraaWifiRemoteStation *station, uint8_t rate) const
{
NS_LOG_FUNCTION (this << station << rate);
NS_LOG_FUNCTION (this << station << static_cast<uint16_t>(rate));
WifiMode mode = GetSupported (station, rate);
return GetThresholds (station, mode);
}

View File

@@ -156,7 +156,7 @@ private:
*
* \return threshold
*/
WifiRraaThresholds GetThresholds (RraaWifiRemoteStation *station, uint32_t rate) const;
WifiRraaThresholds GetThresholds (RraaWifiRemoteStation *station, uint8_t rate) const;
/**
* Get the estimated TxTime of a packet with a given mode.
*

View File

@@ -50,17 +50,12 @@ struct RrpaaWifiRemoteStation : public WifiRemoteStation
bool m_adaptiveRtsOn; //!< Check if Adaptive RTS mechanism is on.
bool m_lastFrameFail; //!< Flag if the last frame sent has failed.
bool m_initialized; //!< For initializing variables.
uint8_t m_nRate; //!< Number of supported rates.
uint8_t m_prevRateIndex; //!< Rate index of the previous transmission.
uint8_t m_rateIndex; //!< Current rate index.
uint8_t m_prevPowerLevel; //!< Power level of the previous transmission.
uint8_t m_powerLevel; //!< Current power level.
RrpaaThresholdsTable m_thresholds; //!< Rrpaa thresholds for this station.
RrpaaProbabilitiesTable m_pdTable; //!< Probability table for power and rate changes.
};
@@ -596,10 +591,9 @@ RrpaaWifiManager::RunAdaptiveRtsAlgorithm (RrpaaWifiRemoteStation *station)
}
WifiRrpaaThresholds
RrpaaWifiManager::GetThresholds (RrpaaWifiRemoteStation *station,
uint32_t rate) const
RrpaaWifiManager::GetThresholds (RrpaaWifiRemoteStation *station, uint8_t rate) const
{
NS_LOG_FUNCTION (this << station << rate);
NS_LOG_FUNCTION (this << station << static_cast<uint16_t>(rate));
WifiMode mode = GetSupported (station, rate);
return GetThresholds (station, mode);
}

View File

@@ -174,7 +174,7 @@ private:
*
* \return threshold
*/
WifiRrpaaThresholds GetThresholds (RrpaaWifiRemoteStation *station, uint32_t rate) const;
WifiRrpaaThresholds GetThresholds (RrpaaWifiRemoteStation *station, uint8_t rate) const;
/**
* Get the estimated TxTime of a packet with a given mode.

View File

@@ -2004,21 +2004,21 @@ WifiRemoteStationManager::DoReportAmpduTxStatus (WifiRemoteStation *station, uin
}
WifiMode
WifiRemoteStationManager::GetSupported (const WifiRemoteStation *station, uint32_t i) const
WifiRemoteStationManager::GetSupported (const WifiRemoteStation *station, uint8_t i) const
{
NS_ASSERT (i < GetNSupported (station));
return station->m_state->m_operationalRateSet[i];
}
WifiMode
WifiRemoteStationManager::GetMcsSupported (const WifiRemoteStation *station, uint32_t i) const
WifiRemoteStationManager::GetMcsSupported (const WifiRemoteStation *station, uint8_t i) const
{
NS_ASSERT (i < GetNMcsSupported (station));
return station->m_state->m_operationalMcsSet[i];
}
WifiMode
WifiRemoteStationManager::GetNonErpSupported (const WifiRemoteStation *station, uint32_t i) const
WifiRemoteStationManager::GetNonErpSupported (const WifiRemoteStation *station, uint8_t i) const
{
NS_ASSERT (i < GetNNonErpSupported (station));
//IEEE 802.11g standard defines that if the protection mechanism is enabled, Rts, Cts and Cts-To-Self
@@ -2117,7 +2117,7 @@ WifiRemoteStationManager::GetLongRetryCount (const WifiRemoteStation *station) c
return station->m_slrc;
}
uint32_t
uint8_t
WifiRemoteStationManager::GetNSupported (const WifiRemoteStation *station) const
{
return station->m_state->m_operationalRateSet.size ();

View File

@@ -920,7 +920,7 @@ protected:
*
* \return WifiMode at the given index of the specified station
*/
WifiMode GetSupported (const WifiRemoteStation *station, uint32_t i) const;
WifiMode GetSupported (const WifiRemoteStation *station, uint8_t i) const;
/**
* Return the number of modes supported by the given station.
*
@@ -928,7 +928,7 @@ protected:
*
* \return the number of modes supported by the given station
*/
uint32_t GetNSupported (const WifiRemoteStation *station) const;
uint8_t GetNSupported (const WifiRemoteStation *station) const;
/**
* Return whether the given station is QoS capable.
*
@@ -974,7 +974,7 @@ protected:
* \return the WifiMode at the given index of the specified station
*/
WifiMode GetMcsSupported (const WifiRemoteStation *station, uint32_t i) const;
WifiMode GetMcsSupported (const WifiRemoteStation *station, uint8_t i) const;
/**
* Return the number of MCS supported by the given station.
*
@@ -991,7 +991,7 @@ protected:
*
* \return WifiMode at the given index of the specified station
*/
WifiMode GetNonErpSupported (const WifiRemoteStation *station, uint32_t i) const;
WifiMode GetNonErpSupported (const WifiRemoteStation *station, uint8_t i) const;
/**
* Return the number of non-ERP modes supported by the given station.
*