From ccd36a6aa46fc69c697296a16d5d9d89d7a4021e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Deronne?= Date: Wed, 23 May 2018 22:35:22 +0200 Subject: [PATCH] wifi: Fix Visual Studio warnings in ApWifiMac --- src/wifi/model/ap-wifi-mac.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/wifi/model/ap-wifi-mac.cc b/src/wifi/model/ap-wifi-mac.cc index 7d75d869d..59d8c0dfa 100644 --- a/src/wifi/model/ap-wifi-mac.cc +++ b/src/wifi/model/ap-wifi-mac.cc @@ -511,7 +511,7 @@ ApWifiMac::GetEdcaParameterSet (void) const edcaParameters.SetBeCWmin (edca->GetMinCw ()); edcaParameters.SetBeCWmax (edca->GetMaxCw ()); edcaParameters.SetBeAifsn (edca->GetAifsn ()); - edcaParameters.SetBeTXOPLimit (txopLimit.GetMicroSeconds () / 32); + edcaParameters.SetBeTXOPLimit (static_cast (txopLimit.GetMicroSeconds () / 32)); edca = m_edca.find (AC_BK)->second; txopLimit = edca->GetTxopLimit (); @@ -519,7 +519,7 @@ ApWifiMac::GetEdcaParameterSet (void) const edcaParameters.SetBkCWmin (edca->GetMinCw ()); edcaParameters.SetBkCWmax (edca->GetMaxCw ()); edcaParameters.SetBkAifsn (edca->GetAifsn ()); - edcaParameters.SetBkTXOPLimit (txopLimit.GetMicroSeconds () / 32); + edcaParameters.SetBkTXOPLimit (static_cast (txopLimit.GetMicroSeconds () / 32)); edca = m_edca.find (AC_VI)->second; txopLimit = edca->GetTxopLimit (); @@ -527,7 +527,7 @@ ApWifiMac::GetEdcaParameterSet (void) const edcaParameters.SetViCWmin (edca->GetMinCw ()); edcaParameters.SetViCWmax (edca->GetMaxCw ()); edcaParameters.SetViAifsn (edca->GetAifsn ()); - edcaParameters.SetViTXOPLimit (txopLimit.GetMicroSeconds () / 32); + edcaParameters.SetViTXOPLimit (static_cast (txopLimit.GetMicroSeconds () / 32)); edca = m_edca.find (AC_VO)->second; txopLimit = edca->GetTxopLimit (); @@ -535,7 +535,7 @@ ApWifiMac::GetEdcaParameterSet (void) const edcaParameters.SetVoCWmin (edca->GetMinCw ()); edcaParameters.SetVoCWmax (edca->GetMaxCw ()); edcaParameters.SetVoAifsn (edca->GetAifsn ()); - edcaParameters.SetVoTXOPLimit (txopLimit.GetMicroSeconds () / 32); + edcaParameters.SetVoTXOPLimit (static_cast (txopLimit.GetMicroSeconds () / 32)); edcaParameters.SetQosInfo (0); } @@ -1542,9 +1542,9 @@ ApWifiMac::DoInitialize (void) { if (m_enableBeaconJitter) { - int64_t jitter = m_beaconJitter->GetValue (0, GetBeaconInterval ().GetMicroSeconds ()); - NS_LOG_DEBUG ("Scheduling initial beacon for access point " << GetAddress () << " at time " << jitter << " microseconds"); - m_beaconEvent = Simulator::Schedule (MicroSeconds (jitter), &ApWifiMac::SendOneBeacon, this); + Time jitter = m_beaconJitter->GetValue (0, 1) * GetBeaconInterval (); + NS_LOG_DEBUG ("Scheduling initial beacon for access point " << GetAddress () << " at time " << jitter); + m_beaconEvent = Simulator::Schedule (jitter, &ApWifiMac::SendOneBeacon, this); } else {