wifi: Fix uint_t types (based on Robert Ammon's patch)
This commit is contained in:
@@ -77,7 +77,7 @@ private:
|
||||
void ResetPortionOfBitmap (uint16_t start, uint16_t end);
|
||||
|
||||
uint16_t m_winStart; ///< window start
|
||||
uint8_t m_winSize; ///< window size
|
||||
uint16_t m_winSize; ///< window size
|
||||
uint16_t m_winEnd; ///< window end
|
||||
|
||||
uint16_t m_bitmap[4096]; ///< bitmap
|
||||
|
||||
@@ -545,8 +545,8 @@ BlockAckManager::NotifyGotBlockAck (const CtrlBAckResponseHeader *blockAck, Mac4
|
||||
if (ExistsAgreementInState (recipient, tid, OriginatorBlockAckAgreement::ESTABLISHED))
|
||||
{
|
||||
bool foundFirstLost = false;
|
||||
uint32_t nSuccessfulMpdus = 0;
|
||||
uint32_t nFailedMpdus = 0;
|
||||
uint8_t nSuccessfulMpdus = 0;
|
||||
uint8_t nFailedMpdus = 0;
|
||||
AgreementsI it = m_agreements.find (std::make_pair (recipient, tid));
|
||||
PacketQueueI queueEnd = it->second.second.end ();
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ DsssErrorRateModel::DqpskFunction (double x)
|
||||
}
|
||||
|
||||
double
|
||||
DsssErrorRateModel::GetDsssDbpskSuccessRate (double sinr, uint32_t nbits)
|
||||
DsssErrorRateModel::GetDsssDbpskSuccessRate (double sinr, uint64_t nbits)
|
||||
{
|
||||
NS_LOG_FUNCTION_NOARGS ();
|
||||
double EbN0 = sinr * 22000000.0 / 1000000.0; //1 bit per symbol with 1 MSPS
|
||||
@@ -49,7 +49,7 @@ DsssErrorRateModel::GetDsssDbpskSuccessRate (double sinr, uint32_t nbits)
|
||||
}
|
||||
|
||||
double
|
||||
DsssErrorRateModel::GetDsssDqpskSuccessRate (double sinr, uint32_t nbits)
|
||||
DsssErrorRateModel::GetDsssDqpskSuccessRate (double sinr, uint64_t nbits)
|
||||
{
|
||||
NS_LOG_FUNCTION_NOARGS ();
|
||||
double EbN0 = sinr * 22000000.0 / 1000000.0 / 2.0; //2 bits per symbol, 1 MSPS
|
||||
@@ -58,7 +58,7 @@ DsssErrorRateModel::GetDsssDqpskSuccessRate (double sinr, uint32_t nbits)
|
||||
}
|
||||
|
||||
double
|
||||
DsssErrorRateModel::GetDsssDqpskCck5_5SuccessRate (double sinr, uint32_t nbits)
|
||||
DsssErrorRateModel::GetDsssDqpskCck5_5SuccessRate (double sinr, uint64_t nbits)
|
||||
{
|
||||
NS_LOG_FUNCTION_NOARGS ();
|
||||
#ifdef HAVE_GSL
|
||||
@@ -92,7 +92,7 @@ DsssErrorRateModel::GetDsssDqpskCck5_5SuccessRate (double sinr, uint32_t nbits)
|
||||
}
|
||||
|
||||
double
|
||||
DsssErrorRateModel::GetDsssDqpskCck11SuccessRate (double sinr, uint32_t nbits)
|
||||
DsssErrorRateModel::GetDsssDqpskCck11SuccessRate (double sinr, uint64_t nbits)
|
||||
{
|
||||
NS_LOG_FUNCTION_NOARGS ();
|
||||
#ifdef HAVE_GSL
|
||||
|
||||
@@ -82,7 +82,7 @@ public:
|
||||
*
|
||||
* \return the chunk success rate of the differential BPSK
|
||||
*/
|
||||
static double GetDsssDbpskSuccessRate (double sinr, uint32_t nbits);
|
||||
static double GetDsssDbpskSuccessRate (double sinr, uint64_t nbits);
|
||||
/**
|
||||
* Return the chunk success rate of the differential encoded QPSK.
|
||||
*
|
||||
@@ -91,7 +91,7 @@ public:
|
||||
*
|
||||
* \return the chunk success rate of the differential encoded QPSK.
|
||||
*/
|
||||
static double GetDsssDqpskSuccessRate (double sinr,uint32_t nbits);
|
||||
static double GetDsssDqpskSuccessRate (double sinr,uint64_t nbits);
|
||||
/**
|
||||
* Return the chunk success rate of the differential encoded QPSK for
|
||||
* 5.5Mbps data rate.
|
||||
@@ -101,7 +101,7 @@ public:
|
||||
*
|
||||
* \return the chunk success rate of the differential encoded QPSK for
|
||||
*/
|
||||
static double GetDsssDqpskCck5_5SuccessRate (double sinr,uint32_t nbits);
|
||||
static double GetDsssDqpskCck5_5SuccessRate (double sinr,uint64_t nbits);
|
||||
/**
|
||||
* Return the chunk success rate of the differential encoded QPSK for
|
||||
* 11Mbps data rate.
|
||||
@@ -111,7 +111,7 @@ public:
|
||||
*
|
||||
* \return the chunk success rate of the differential encoded QPSK for
|
||||
*/
|
||||
static double GetDsssDqpskCck11SuccessRate (double sinr,uint32_t nbits);
|
||||
static double GetDsssDqpskCck11SuccessRate (double sinr,uint64_t nbits);
|
||||
#ifdef HAVE_GSL
|
||||
static double SymbolErrorProb16Cck (double e2); /// equation (18) in Pursley's paper
|
||||
static double SymbolErrorProb256Cck (double e1); /// equation (17) in Pursley's paper
|
||||
|
||||
@@ -332,7 +332,7 @@ RegularWifiMac::GetHeCapabilities (void) const
|
||||
}
|
||||
|
||||
void
|
||||
RegularWifiMac::SetVoMaxAmsduSize (uint32_t size)
|
||||
RegularWifiMac::SetVoMaxAmsduSize (uint16_t size)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << size);
|
||||
m_voMaxAmsduSize = size;
|
||||
@@ -340,7 +340,7 @@ RegularWifiMac::SetVoMaxAmsduSize (uint32_t size)
|
||||
}
|
||||
|
||||
void
|
||||
RegularWifiMac::SetViMaxAmsduSize (uint32_t size)
|
||||
RegularWifiMac::SetViMaxAmsduSize (uint16_t size)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << size);
|
||||
m_viMaxAmsduSize = size;
|
||||
@@ -348,7 +348,7 @@ RegularWifiMac::SetViMaxAmsduSize (uint32_t size)
|
||||
}
|
||||
|
||||
void
|
||||
RegularWifiMac::SetBeMaxAmsduSize (uint32_t size)
|
||||
RegularWifiMac::SetBeMaxAmsduSize (uint16_t size)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << size);
|
||||
m_beMaxAmsduSize = size;
|
||||
@@ -356,7 +356,7 @@ RegularWifiMac::SetBeMaxAmsduSize (uint32_t size)
|
||||
}
|
||||
|
||||
void
|
||||
RegularWifiMac::SetBkMaxAmsduSize (uint32_t size)
|
||||
RegularWifiMac::SetBkMaxAmsduSize (uint16_t size)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << size);
|
||||
m_bkMaxAmsduSize = size;
|
||||
@@ -364,7 +364,7 @@ RegularWifiMac::SetBkMaxAmsduSize (uint32_t size)
|
||||
}
|
||||
|
||||
void
|
||||
RegularWifiMac::SetVoMaxAmpduSize (uint32_t size)
|
||||
RegularWifiMac::SetVoMaxAmpduSize (uint16_t size)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << size);
|
||||
m_voMaxAmpduSize = size;
|
||||
@@ -372,7 +372,7 @@ RegularWifiMac::SetVoMaxAmpduSize (uint32_t size)
|
||||
}
|
||||
|
||||
void
|
||||
RegularWifiMac::SetViMaxAmpduSize (uint32_t size)
|
||||
RegularWifiMac::SetViMaxAmpduSize (uint16_t size)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << size);
|
||||
m_viMaxAmpduSize = size;
|
||||
@@ -380,7 +380,7 @@ RegularWifiMac::SetViMaxAmpduSize (uint32_t size)
|
||||
}
|
||||
|
||||
void
|
||||
RegularWifiMac::SetBeMaxAmpduSize (uint32_t size)
|
||||
RegularWifiMac::SetBeMaxAmpduSize (uint16_t size)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << size);
|
||||
m_beMaxAmpduSize = size;
|
||||
@@ -388,7 +388,7 @@ RegularWifiMac::SetBeMaxAmpduSize (uint32_t size)
|
||||
}
|
||||
|
||||
void
|
||||
RegularWifiMac::SetBkMaxAmpduSize (uint32_t size)
|
||||
RegularWifiMac::SetBkMaxAmpduSize (uint16_t size)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << size);
|
||||
m_bkMaxAmpduSize = size;
|
||||
@@ -1117,49 +1117,49 @@ RegularWifiMac::GetTypeId (void)
|
||||
"Value 0 means A-MSDU is disabled for that AC.",
|
||||
UintegerValue (0),
|
||||
MakeUintegerAccessor (&RegularWifiMac::SetVoMaxAmsduSize),
|
||||
MakeUintegerChecker<uint32_t> (0, 11426))
|
||||
MakeUintegerChecker<uint16_t> (0, 11426))
|
||||
.AddAttribute ("VI_MaxAmsduSize",
|
||||
"Maximum length in bytes of an A-MSDU for AC_VI access class."
|
||||
"Value 0 means A-MSDU is disabled for that AC.",
|
||||
UintegerValue (0),
|
||||
MakeUintegerAccessor (&RegularWifiMac::SetViMaxAmsduSize),
|
||||
MakeUintegerChecker<uint32_t> (0, 11426))
|
||||
MakeUintegerChecker<uint16_t> (0, 11426))
|
||||
.AddAttribute ("BE_MaxAmsduSize",
|
||||
"Maximum length in bytes of an A-MSDU for AC_BE access class."
|
||||
"Value 0 means A-MSDU is disabled for that AC.",
|
||||
UintegerValue (0),
|
||||
MakeUintegerAccessor (&RegularWifiMac::SetBeMaxAmsduSize),
|
||||
MakeUintegerChecker<uint32_t> (0, 11426))
|
||||
MakeUintegerChecker<uint16_t> (0, 11426))
|
||||
.AddAttribute ("BK_MaxAmsduSize",
|
||||
"Maximum length in bytes of an A-MSDU for AC_BK access class."
|
||||
"Value 0 means A-MSDU is disabled for that AC.",
|
||||
UintegerValue (0),
|
||||
MakeUintegerAccessor (&RegularWifiMac::SetBkMaxAmsduSize),
|
||||
MakeUintegerChecker<uint32_t> (0, 11426))
|
||||
MakeUintegerChecker<uint16_t> (0, 11426))
|
||||
.AddAttribute ("VO_MaxAmpduSize",
|
||||
"Maximum length in bytes of an A-MPDU for AC_VO access class."
|
||||
"Value 0 means A-MPDU is disabled for that AC.",
|
||||
UintegerValue (0),
|
||||
MakeUintegerAccessor (&RegularWifiMac::SetVoMaxAmpduSize),
|
||||
MakeUintegerChecker<uint32_t> (0, 65535))
|
||||
MakeUintegerChecker<uint16_t> ())
|
||||
.AddAttribute ("VI_MaxAmpduSize",
|
||||
"Maximum length in bytes of an A-MPDU for AC_VI access class."
|
||||
"Value 0 means A-MPDU is disabled for that AC.",
|
||||
UintegerValue (65535),
|
||||
MakeUintegerAccessor (&RegularWifiMac::SetViMaxAmpduSize),
|
||||
MakeUintegerChecker<uint32_t> (0, 65535))
|
||||
MakeUintegerChecker<uint16_t> ())
|
||||
.AddAttribute ("BE_MaxAmpduSize",
|
||||
"Maximum length in bytes of an A-MPDU for AC_BE access class."
|
||||
"Value 0 means A-MPDU is disabled for that AC.",
|
||||
UintegerValue (65535),
|
||||
MakeUintegerAccessor (&RegularWifiMac::SetBeMaxAmpduSize),
|
||||
MakeUintegerChecker<uint32_t> (0, 65535))
|
||||
MakeUintegerChecker<uint16_t> ())
|
||||
.AddAttribute ("BK_MaxAmpduSize",
|
||||
"Maximum length in bytes of an A-MPDU for AC_BK access class."
|
||||
"Value 0 means A-MPDU is disabled for that AC.",
|
||||
UintegerValue (0),
|
||||
MakeUintegerAccessor (&RegularWifiMac::SetBkMaxAmpduSize),
|
||||
MakeUintegerChecker<uint32_t> (0, 65535))
|
||||
MakeUintegerChecker<uint16_t> ())
|
||||
.AddAttribute ("VO_BlockAckThreshold",
|
||||
"If number of packets in VO queue reaches this value, "
|
||||
"block ack mechanism is used. If this value is 0, block ack is never used."
|
||||
|
||||
@@ -596,50 +596,50 @@ private:
|
||||
*
|
||||
* \param size the maximum A-MSDU size for AC_VO.
|
||||
*/
|
||||
void SetVoMaxAmsduSize (uint32_t size);
|
||||
void SetVoMaxAmsduSize (uint16_t size);
|
||||
/**
|
||||
* Set the maximum A-MSDU size for AC_VI.
|
||||
*
|
||||
* \param size the maximum A-MSDU size for AC_VI.
|
||||
*/
|
||||
void SetViMaxAmsduSize (uint32_t size);
|
||||
void SetViMaxAmsduSize (uint16_t size);
|
||||
/**
|
||||
* Set the maximum A-MSDU size for AC_BE.
|
||||
*
|
||||
* \param size the maximum A-MSDU size for AC_BE.
|
||||
*/
|
||||
void SetBeMaxAmsduSize (uint32_t size);
|
||||
void SetBeMaxAmsduSize (uint16_t size);
|
||||
/**
|
||||
* Set the maximum A-MSDU size for AC_BK.
|
||||
*
|
||||
* \param size the maximum A-MSDU size for AC_BK.
|
||||
*/
|
||||
void SetBkMaxAmsduSize (uint32_t size);
|
||||
void SetBkMaxAmsduSize (uint16_t size);
|
||||
|
||||
/**
|
||||
* Set the maximum A-MPDU size for AC_VO.
|
||||
*
|
||||
* \param size the maximum A-MPDU size for AC_VO.
|
||||
*/
|
||||
void SetVoMaxAmpduSize (uint32_t size);
|
||||
void SetVoMaxAmpduSize (uint16_t size);
|
||||
/**
|
||||
* Set the maximum A-MPDU size for AC_VI.
|
||||
*
|
||||
* \param size the maximum A-MPDU size for AC_VI.
|
||||
*/
|
||||
void SetViMaxAmpduSize (uint32_t size);
|
||||
void SetViMaxAmpduSize (uint16_t size);
|
||||
/**
|
||||
* Set the maximum A-MPDU size for AC_BE.
|
||||
*
|
||||
* \param size the maximum A-MPDU size for AC_BE.
|
||||
*/
|
||||
void SetBeMaxAmpduSize (uint32_t size);
|
||||
void SetBeMaxAmpduSize (uint16_t size);
|
||||
/**
|
||||
* Set the maximum A-MPDU size for AC_BK.
|
||||
*
|
||||
* \param size the maximum A-MPDU size for AC_BK.
|
||||
*/
|
||||
void SetBkMaxAmpduSize (uint32_t size);
|
||||
void SetBkMaxAmpduSize (uint16_t size);
|
||||
|
||||
/**
|
||||
* Set the Block ACK threshold for AC_VO.
|
||||
@@ -698,15 +698,15 @@ private:
|
||||
/// Disable aggregation function
|
||||
void DisableAggregation (void);
|
||||
|
||||
uint32_t m_voMaxAmsduSize; ///< maximum A-MSDU size for AC_VO
|
||||
uint32_t m_viMaxAmsduSize; ///< maximum A-MSDU size for AC_VI
|
||||
uint32_t m_beMaxAmsduSize; ///< maximum A-MSDU size for AC_BE
|
||||
uint32_t m_bkMaxAmsduSize; ///< maximum A-MSDU size for AC_BK
|
||||
uint16_t m_voMaxAmsduSize; ///< maximum A-MSDU size for AC_VO
|
||||
uint16_t m_viMaxAmsduSize; ///< maximum A-MSDU size for AC_VI
|
||||
uint16_t m_beMaxAmsduSize; ///< maximum A-MSDU size for AC_BE
|
||||
uint16_t m_bkMaxAmsduSize; ///< maximum A-MSDU size for AC_BK
|
||||
|
||||
uint32_t m_voMaxAmpduSize; ///< maximum A-MPDU size for AC_VO
|
||||
uint32_t m_viMaxAmpduSize; ///< maximum A-MPDU size for AC_VI
|
||||
uint32_t m_beMaxAmpduSize; ///< maximum A-MPDU size for AC_BE
|
||||
uint32_t m_bkMaxAmpduSize; ///< maximum A-MPDU size for AC_BK
|
||||
uint16_t m_voMaxAmpduSize; ///< maximum A-MPDU size for AC_VO
|
||||
uint16_t m_viMaxAmpduSize; ///< maximum A-MPDU size for AC_VI
|
||||
uint16_t m_beMaxAmpduSize; ///< maximum A-MPDU size for AC_BE
|
||||
uint16_t m_bkMaxAmpduSize; ///< maximum A-MPDU size for AC_BK
|
||||
|
||||
TracedCallback<const WifiMacHeader &> m_txOkCallback; ///< transmit OK callback
|
||||
TracedCallback<const WifiMacHeader &> m_txErrCallback; ///< transmit error callback
|
||||
|
||||
@@ -662,7 +662,7 @@ WifiMacHeader::GetSequenceNumber (void) const
|
||||
return m_seqSeq;
|
||||
}
|
||||
|
||||
uint16_t
|
||||
uint8_t
|
||||
WifiMacHeader::GetFragmentNumber (void) const
|
||||
{
|
||||
return m_seqFrag;
|
||||
|
||||
@@ -452,7 +452,7 @@ public:
|
||||
*
|
||||
* \return the fragment number of the header
|
||||
*/
|
||||
uint16_t GetFragmentNumber (void) const;
|
||||
uint8_t GetFragmentNumber (void) const;
|
||||
/**
|
||||
* Return if the Retry bit is set.
|
||||
*
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "wifi-mac-header.h"
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
class QosBlockedDestinations;
|
||||
|
||||
/**
|
||||
|
||||
@@ -207,7 +207,7 @@ WifiPhy::GetTypeId (void)
|
||||
"TxPowerStart and TxPowerEnd included.",
|
||||
UintegerValue (1),
|
||||
MakeUintegerAccessor (&WifiPhy::m_nTxPower),
|
||||
MakeUintegerChecker<uint32_t> ())
|
||||
MakeUintegerChecker<uint8_t> ())
|
||||
.AddAttribute ("TxPowerEnd",
|
||||
"Maximum available transmission level (dbm).",
|
||||
DoubleValue (16.0206),
|
||||
@@ -535,13 +535,13 @@ WifiPhy::GetTxPowerEnd (void) const
|
||||
}
|
||||
|
||||
void
|
||||
WifiPhy::SetNTxPower (uint32_t n)
|
||||
WifiPhy::SetNTxPower (uint8_t n)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << n);
|
||||
NS_LOG_FUNCTION (this << static_cast<uint16_t>(n));
|
||||
m_nTxPower = n;
|
||||
}
|
||||
|
||||
uint32_t
|
||||
uint8_t
|
||||
WifiPhy::GetNTxPower (void) const
|
||||
{
|
||||
return m_nTxPower;
|
||||
|
||||
@@ -1431,13 +1431,13 @@ public:
|
||||
*
|
||||
* \param n the number of available levels
|
||||
*/
|
||||
void SetNTxPower (uint32_t n);
|
||||
void SetNTxPower (uint8_t n);
|
||||
/**
|
||||
* Return the number of available transmission power levels.
|
||||
*
|
||||
* \return the number of available transmission power levels
|
||||
*/
|
||||
uint32_t GetNTxPower (void) const;
|
||||
uint8_t GetNTxPower (void) const;
|
||||
/**
|
||||
* Sets the transmission gain (dB).
|
||||
*
|
||||
@@ -1956,7 +1956,7 @@ private:
|
||||
double m_rxGainDb; //!< Reception gain (dB)
|
||||
double m_txPowerBaseDbm; //!< Minimum transmission power (dBm)
|
||||
double m_txPowerEndDbm; //!< Maximum transmission power (dBm)
|
||||
uint32_t m_nTxPower; //!< Number of available transmission power levels
|
||||
uint8_t m_nTxPower; //!< Number of available transmission power levels
|
||||
|
||||
bool m_ldpc; //!< Flag if LDPC is used
|
||||
bool m_stbc; //!< Flag if STBC is used
|
||||
|
||||
Reference in New Issue
Block a user