OLD | NEW |
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * Copyright (c) 2008 INRIA | 3 * Copyright (c) 2008 INRIA |
4 * | 4 * |
5 * This program is free software; you can redistribute it and/or modify | 5 * This program is free software; you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 2 as | 6 * it under the terms of the GNU General Public License version 2 as |
7 * published by the Free Software Foundation; | 7 * published by the Free Software Foundation; |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 capabilities.SetRxMcsBitmask (mcs.GetMcsValue ()); | 197 capabilities.SetRxMcsBitmask (mcs.GetMcsValue ()); |
198 uint8_t nss = (mcs.GetMcsValue () / 8) + 1; | 198 uint8_t nss = (mcs.GetMcsValue () / 8) + 1; |
199 NS_ASSERT (nss > 0 && nss < 5); | 199 NS_ASSERT (nss > 0 && nss < 5); |
200 uint64_t dataRate = mcs.GetDataRate (m_phy->GetChannelWidth (), m_phy-
>GetShortGuardInterval () ? 400 : 800, nss); | 200 uint64_t dataRate = mcs.GetDataRate (m_phy->GetChannelWidth (), m_phy-
>GetShortGuardInterval () ? 400 : 800, nss); |
201 if (dataRate > maxSupportedRate) | 201 if (dataRate > maxSupportedRate) |
202 { | 202 { |
203 maxSupportedRate = dataRate; | 203 maxSupportedRate = dataRate; |
204 NS_LOG_DEBUG ("Updating maxSupportedRate to " << maxSupportedRate)
; | 204 NS_LOG_DEBUG ("Updating maxSupportedRate to " << maxSupportedRate)
; |
205 } | 205 } |
206 } | 206 } |
207 capabilities.SetRxHighestSupportedDataRate (maxSupportedRate / 1e6); //in
Mbit/s | 207 capabilities.SetRxHighestSupportedDataRate (static_cast<uint16_t> (maxSupp
ortedRate / 1e6)); //in Mbit/s |
208 capabilities.SetTxMcsSetDefined (m_phy->GetNMcs () > 0); | 208 capabilities.SetTxMcsSetDefined (m_phy->GetNMcs () > 0); |
209 capabilities.SetTxMaxNSpatialStreams (m_phy->GetMaxSupportedTxSpatialStrea
ms ()); | 209 capabilities.SetTxMaxNSpatialStreams (m_phy->GetMaxSupportedTxSpatialStrea
ms ()); |
210 //we do not support unequal modulations | 210 //we do not support unequal modulations |
211 capabilities.SetTxRxMcsSetUnequal (0); | 211 capabilities.SetTxRxMcsSetUnequal (0); |
212 capabilities.SetTxUnequalModulation (0); | 212 capabilities.SetTxUnequalModulation (0); |
213 } | 213 } |
214 return capabilities; | 214 return capabilities; |
215 } | 215 } |
216 | 216 |
217 VhtCapabilities | 217 VhtCapabilities |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 if (mcs.GetModulationClass () != WIFI_MOD_CLASS_VHT || !mcs.IsAllowed
(m_phy->GetChannelWidth (), 1)) | 264 if (mcs.GetModulationClass () != WIFI_MOD_CLASS_VHT || !mcs.IsAllowed
(m_phy->GetChannelWidth (), 1)) |
265 { | 265 { |
266 continue; | 266 continue; |
267 } | 267 } |
268 if (mcs.GetDataRate (m_phy->GetChannelWidth ()) > maxSupportedRateLGI) | 268 if (mcs.GetDataRate (m_phy->GetChannelWidth ()) > maxSupportedRateLGI) |
269 { | 269 { |
270 maxSupportedRateLGI = mcs.GetDataRate (m_phy->GetChannelWidth ()); | 270 maxSupportedRateLGI = mcs.GetDataRate (m_phy->GetChannelWidth ()); |
271 NS_LOG_DEBUG ("Updating maxSupportedRateLGI to " << maxSupportedRa
teLGI); | 271 NS_LOG_DEBUG ("Updating maxSupportedRateLGI to " << maxSupportedRa
teLGI); |
272 } | 272 } |
273 } | 273 } |
274 capabilities.SetRxHighestSupportedLgiDataRate (maxSupportedRateLGI / 1e6);
//in Mbit/s | 274 capabilities.SetRxHighestSupportedLgiDataRate (static_cast<uint16_t> (maxS
upportedRateLGI / 1e6)); //in Mbit/s |
275 capabilities.SetTxHighestSupportedLgiDataRate (maxSupportedRateLGI / 1e6);
//in Mbit/s | 275 capabilities.SetTxHighestSupportedLgiDataRate (static_cast<uint16_t> (maxS
upportedRateLGI / 1e6)); //in Mbit/s |
276 //To be filled in once supported | 276 //To be filled in once supported |
277 capabilities.SetRxStbc (0); | 277 capabilities.SetRxStbc (0); |
278 capabilities.SetTxStbc (0); | 278 capabilities.SetTxStbc (0); |
279 } | 279 } |
280 return capabilities; | 280 return capabilities; |
281 } | 281 } |
282 | 282 |
283 HeCapabilities | 283 HeCapabilities |
284 RegularWifiMac::GetHeCapabilities (void) const | 284 RegularWifiMac::GetHeCapabilities (void) const |
285 { | 285 { |
(...skipping 1113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1399 { | 1399 { |
1400 NS_LOG_FUNCTION (this); | 1400 NS_LOG_FUNCTION (this); |
1401 for (EdcaQueues::const_iterator i = m_edca.begin (); i != m_edca.end (); ++i) | 1401 for (EdcaQueues::const_iterator i = m_edca.begin (); i != m_edca.end (); ++i) |
1402 { | 1402 { |
1403 i->second->SetMsduAggregator (0); | 1403 i->second->SetMsduAggregator (0); |
1404 i->second->SetMpduAggregator (0); | 1404 i->second->SetMpduAggregator (0); |
1405 } | 1405 } |
1406 } | 1406 } |
1407 | 1407 |
1408 } //namespace ns3 | 1408 } //namespace ns3 |
OLD | NEW |