wifi: fix wrong uint types
This commit is contained in:
@@ -118,7 +118,7 @@ InterferenceExperiment::SendA (void) const
|
||||
{
|
||||
Ptr<Packet> p = Create<Packet> (m_input.packetSizeA);
|
||||
WifiTxVector txVector;
|
||||
txVector.SetTxPowerLevel (m_input.txPowerLevelA);
|
||||
txVector.SetTxPowerLevel (0); //only one TX power level
|
||||
txVector.SetMode (WifiMode (m_input.txModeA));
|
||||
txVector.SetPreambleType (m_input.preamble);
|
||||
m_txA->SendPacket (p, txVector);
|
||||
@@ -129,7 +129,7 @@ InterferenceExperiment::SendB (void) const
|
||||
{
|
||||
Ptr<Packet> p = Create<Packet> (m_input.packetSizeB);
|
||||
WifiTxVector txVector;
|
||||
txVector.SetTxPowerLevel (m_input.txPowerLevelB);
|
||||
txVector.SetTxPowerLevel (0); //only one TX power level
|
||||
txVector.SetMode (WifiMode (m_input.txModeB));
|
||||
txVector.SetPreambleType (m_input.preamble);
|
||||
m_txB->SendPacket (p, txVector);
|
||||
|
||||
@@ -373,8 +373,8 @@ WifiPhy::GetTypeId (void)
|
||||
WifiPhy::WifiPhy ()
|
||||
: m_mpdusNum (0),
|
||||
m_plcpSuccess (false),
|
||||
m_txMpduReferenceNumber (0xffffffffffffffff),
|
||||
m_rxMpduReferenceNumber (0xffffffffffffffff),
|
||||
m_txMpduReferenceNumber (0xffffffff),
|
||||
m_rxMpduReferenceNumber (0xffffffff),
|
||||
m_endRxEvent (),
|
||||
m_endPlcpRxEvent (),
|
||||
m_standard (WIFI_PHY_STANDARD_UNSPECIFIED),
|
||||
|
||||
@@ -74,7 +74,7 @@ struct SignalNoiseDbm
|
||||
struct MpduInfo
|
||||
{
|
||||
MpduType type; ///< type
|
||||
uint64_t mpduRefNumber; ///< MPDU ref number
|
||||
uint32_t mpduRefNumber; ///< MPDU ref number
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -1677,8 +1677,8 @@ protected:
|
||||
|
||||
uint16_t m_mpdusNum; //!< carries the number of expected mpdus that are part of an A-MPDU
|
||||
bool m_plcpSuccess; //!< Flag if the PLCP of the packet or the first MPDU in an A-MPDU has been received
|
||||
uint64_t m_txMpduReferenceNumber; //!< A-MPDU reference number to identify all transmitted subframes belonging to the same received A-MPDU
|
||||
uint64_t m_rxMpduReferenceNumber; //!< A-MPDU reference number to identify all received subframes belonging to the same received A-MPDU
|
||||
uint32_t m_txMpduReferenceNumber; //!< A-MPDU reference number to identify all transmitted subframes belonging to the same received A-MPDU
|
||||
uint32_t m_rxMpduReferenceNumber; //!< A-MPDU reference number to identify all received subframes belonging to the same received A-MPDU
|
||||
|
||||
EventId m_endRxEvent; //!< the end reeive event
|
||||
EventId m_endPlcpRxEvent; //!< the end PLCP receive event
|
||||
|
||||
@@ -271,7 +271,7 @@ CtrlBAckResponseHeaderTest::DoRun (void)
|
||||
//Case 1: startSeq < endSeq
|
||||
// 179 242
|
||||
m_blockAckHdr.SetStartingSequence (179);
|
||||
for (uint8_t i = 179; i < 220; i++)
|
||||
for (uint16_t i = 179; i < 220; i++)
|
||||
{
|
||||
m_blockAckHdr.SetReceivedPacket (i);
|
||||
}
|
||||
@@ -295,7 +295,7 @@ CtrlBAckResponseHeaderTest::DoRun (void)
|
||||
{
|
||||
m_blockAckHdr.SetReceivedPacket (i);
|
||||
}
|
||||
for (uint8_t i = 22; i < 25; i++)
|
||||
for (uint16_t i = 22; i < 25; i++)
|
||||
{
|
||||
m_blockAckHdr.SetReceivedPacket (i);
|
||||
}
|
||||
|
||||
@@ -27,8 +27,8 @@ using namespace ns3;
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("InterferenceHelperTxDurationTest");
|
||||
|
||||
static const double CHANNEL_1_MHZ = 2412.0; // a 2.4 GHz center frequency (MHz)
|
||||
static const double CHANNEL_36_MHZ = 5180.0; // a 5 GHz center frequency (MHz)
|
||||
static const uint16_t CHANNEL_1_MHZ = 2412; // a 2.4 GHz center frequency (MHz)
|
||||
static const uint16_t CHANNEL_36_MHZ = 5180; // a 5 GHz center frequency (MHz)
|
||||
|
||||
/**
|
||||
* \ingroup wifi-test
|
||||
@@ -58,7 +58,7 @@ private:
|
||||
*
|
||||
* @return true if values correspond, false otherwise
|
||||
*/
|
||||
bool CheckPayloadDuration (uint32_t size, WifiMode payloadMode, uint32_t channelWidth, uint16_t guardInterval, WifiPreamble preamble, Time knownDuration);
|
||||
bool CheckPayloadDuration (uint32_t size, WifiMode payloadMode, uint8_t channelWidth, uint16_t guardInterval, WifiPreamble preamble, Time knownDuration);
|
||||
|
||||
/**
|
||||
* Check if the overall tx duration returned by InterferenceHelper
|
||||
@@ -73,7 +73,7 @@ private:
|
||||
*
|
||||
* @return true if values correspond, false otherwise
|
||||
*/
|
||||
bool CheckTxDuration (uint32_t size, WifiMode payloadMode, uint32_t channelWidth, uint16_t guardInterval, WifiPreamble preamble, Time knownDuration);
|
||||
bool CheckTxDuration (uint32_t size, WifiMode payloadMode, uint8_t channelWidth, uint16_t guardInterval, WifiPreamble preamble, Time knownDuration);
|
||||
|
||||
};
|
||||
|
||||
@@ -87,7 +87,7 @@ TxDurationTest::~TxDurationTest ()
|
||||
}
|
||||
|
||||
bool
|
||||
TxDurationTest::CheckPayloadDuration (uint32_t size, WifiMode payloadMode, uint32_t channelWidth, uint16_t guardInterval, WifiPreamble preamble, Time knownDuration)
|
||||
TxDurationTest::CheckPayloadDuration (uint32_t size, WifiMode payloadMode, uint8_t channelWidth, uint16_t guardInterval, WifiPreamble preamble, Time knownDuration)
|
||||
{
|
||||
WifiTxVector txVector;
|
||||
txVector.SetMode (payloadMode);
|
||||
@@ -97,7 +97,7 @@ TxDurationTest::CheckPayloadDuration (uint32_t size, WifiMode payloadMode, uint3
|
||||
txVector.SetNss (1);
|
||||
txVector.SetStbc (0);
|
||||
txVector.SetNess (0);
|
||||
double testedFrequency = CHANNEL_1_MHZ;
|
||||
uint16_t testedFrequency = CHANNEL_1_MHZ;
|
||||
Ptr<YansWifiPhy> phy = CreateObject<YansWifiPhy> ();
|
||||
if (payloadMode.GetModulationClass () == WIFI_MOD_CLASS_OFDM
|
||||
|| payloadMode.GetModulationClass () == WIFI_MOD_CLASS_HT
|
||||
@@ -129,7 +129,7 @@ TxDurationTest::CheckPayloadDuration (uint32_t size, WifiMode payloadMode, uint3
|
||||
{
|
||||
std::cerr << "size=" << size
|
||||
<< " mode=" << payloadMode
|
||||
<< " channelWidth=" << channelWidth
|
||||
<< " channelWidth=" << static_cast<uint16_t> (channelWidth)
|
||||
<< " guardInterval=" << guardInterval
|
||||
<< " datarate=" << payloadMode.GetDataRate (channelWidth, guardInterval, 1)
|
||||
<< " known=" << knownDuration
|
||||
@@ -142,7 +142,7 @@ TxDurationTest::CheckPayloadDuration (uint32_t size, WifiMode payloadMode, uint3
|
||||
}
|
||||
|
||||
bool
|
||||
TxDurationTest::CheckTxDuration (uint32_t size, WifiMode payloadMode, uint32_t channelWidth, uint16_t guardInterval, WifiPreamble preamble, Time knownDuration)
|
||||
TxDurationTest::CheckTxDuration (uint32_t size, WifiMode payloadMode, uint8_t channelWidth, uint16_t guardInterval, WifiPreamble preamble, Time knownDuration)
|
||||
{
|
||||
WifiTxVector txVector;
|
||||
txVector.SetMode (payloadMode);
|
||||
@@ -152,7 +152,7 @@ TxDurationTest::CheckTxDuration (uint32_t size, WifiMode payloadMode, uint32_t c
|
||||
txVector.SetNss (1);
|
||||
txVector.SetStbc (0);
|
||||
txVector.SetNess (0);
|
||||
double testedFrequency = CHANNEL_1_MHZ;
|
||||
uint16_t testedFrequency = CHANNEL_1_MHZ;
|
||||
Ptr<YansWifiPhy> phy = CreateObject<YansWifiPhy> ();
|
||||
if (payloadMode.GetModulationClass () == WIFI_MOD_CLASS_OFDM
|
||||
|| payloadMode.GetModulationClass () == WIFI_MOD_CLASS_HT
|
||||
@@ -166,7 +166,7 @@ TxDurationTest::CheckTxDuration (uint32_t size, WifiMode payloadMode, uint32_t c
|
||||
{
|
||||
std::cerr << "size=" << size
|
||||
<< " mode=" << payloadMode
|
||||
<< " channelWidth=" << channelWidth
|
||||
<< " channelWidth=" << static_cast<uint16_t> (channelWidth)
|
||||
<< " guardInterval=" << guardInterval
|
||||
<< " datarate=" << payloadMode.GetDataRate (channelWidth, guardInterval, 1)
|
||||
<< " preamble=" << preamble
|
||||
|
||||
Reference in New Issue
Block a user