diff --git a/src/wifi/model/aarf-wifi-manager.cc b/src/wifi/model/aarf-wifi-manager.cc index 838ffefd9..100058996 100644 --- a/src/wifi/model/aarf-wifi-manager.cc +++ b/src/wifi/model/aarf-wifi-manager.cc @@ -229,7 +229,7 @@ AarfWifiManager::DoGetDataTxVector (WifiRemoteStation *st, uint32_t size) { NS_LOG_FUNCTION (this << st << size); AarfWifiRemoteStation *station = (AarfWifiRemoteStation *) st; - return WifiTxVector (GetSupported (station, station->m_rate), GetDefaultTxPowerLevel (), GetLongRetryCount (station), GetShortGuardInterval (station), Min (GetNumberOfReceiveAntennas (station),GetNumberOfTransmitAntennas()), GetNumberOfTransmitAntennas (station), GetStbc (station)); + return WifiTxVector (GetSupported (station, station->m_rate), GetDefaultTxPowerLevel (), GetLongRetryCount (station), GetShortGuardInterval (station), Min (GetNumberOfReceiveAntennas (station),GetNumberOfTransmitAntennas()), GetNess (station), GetStbc (station)); } WifiTxVector AarfWifiManager::DoGetRtsTxVector (WifiRemoteStation *st) @@ -238,7 +238,7 @@ AarfWifiManager::DoGetRtsTxVector (WifiRemoteStation *st) /// \todo we could/should implement the Aarf algorithm for /// RTS only by picking a single rate within the BasicRateSet. AarfWifiRemoteStation *station = (AarfWifiRemoteStation *) st; - return WifiTxVector (GetSupported (station, 0), GetDefaultTxPowerLevel (), GetLongRetryCount (station), GetShortGuardInterval (station), Min (GetNumberOfReceiveAntennas (station),GetNumberOfTransmitAntennas()), GetNumberOfTransmitAntennas (station), GetStbc (station)); + return WifiTxVector (GetSupported (station, 0), GetDefaultTxPowerLevel (), GetLongRetryCount (station), GetShortGuardInterval (station), Min (GetNumberOfReceiveAntennas (station),GetNumberOfTransmitAntennas()), GetNess (station), GetStbc (station)); } bool diff --git a/src/wifi/model/aarfcd-wifi-manager.cc b/src/wifi/model/aarfcd-wifi-manager.cc index 976772e7b..3d4b16bc7 100644 --- a/src/wifi/model/aarfcd-wifi-manager.cc +++ b/src/wifi/model/aarfcd-wifi-manager.cc @@ -297,7 +297,7 @@ AarfcdWifiManager::DoGetDataTxVector (WifiRemoteStation *st, uint32_t size) { NS_LOG_FUNCTION (this << st << size); AarfcdWifiRemoteStation *station = (AarfcdWifiRemoteStation *) st; - return WifiTxVector (GetSupported (station, station->m_rate), GetDefaultTxPowerLevel (), GetLongRetryCount (station), GetShortGuardInterval (station), Min (GetNumberOfReceiveAntennas (station),GetNumberOfTransmitAntennas()), GetNumberOfTransmitAntennas (station), GetStbc (station)); + return WifiTxVector (GetSupported (station, station->m_rate), GetDefaultTxPowerLevel (), GetLongRetryCount (station), GetShortGuardInterval (station), Min (GetNumberOfReceiveAntennas (station),GetNumberOfTransmitAntennas()), GetNess (station), GetStbc (station)); } WifiTxVector AarfcdWifiManager::DoGetRtsTxVector (WifiRemoteStation *st) @@ -306,7 +306,7 @@ AarfcdWifiManager::DoGetRtsTxVector (WifiRemoteStation *st) /// \todo we could/should implement the Aarf algorithm for /// RTS only by picking a single rate within the BasicRateSet. AarfcdWifiRemoteStation *station = (AarfcdWifiRemoteStation *) st; - return WifiTxVector (GetSupported (station, 0), GetDefaultTxPowerLevel (), GetShortRetryCount (station), GetShortGuardInterval (station), Min (GetNumberOfReceiveAntennas (station),GetNumberOfTransmitAntennas()), GetNumberOfTransmitAntennas (station), GetStbc (station)); + return WifiTxVector (GetSupported (station, 0), GetDefaultTxPowerLevel (), GetShortRetryCount (station), GetShortGuardInterval (station), Min (GetNumberOfReceiveAntennas (station),GetNumberOfTransmitAntennas()), GetNess (station), GetStbc (station)); } bool diff --git a/src/wifi/model/amrr-wifi-manager.cc b/src/wifi/model/amrr-wifi-manager.cc index 0f2517192..bfdd8bc28 100644 --- a/src/wifi/model/amrr-wifi-manager.cc +++ b/src/wifi/model/amrr-wifi-manager.cc @@ -321,7 +321,7 @@ AmrrWifiManager::DoGetDataTxVector (WifiRemoteStation *st, uint32_t size) } } - return WifiTxVector (GetSupported (station, rateIndex), GetDefaultTxPowerLevel (), GetLongRetryCount (station), GetShortGuardInterval (station), Min (GetNumberOfReceiveAntennas (station),GetNumberOfTransmitAntennas()), GetNumberOfTransmitAntennas (station), GetStbc (station)); + return WifiTxVector (GetSupported (station, rateIndex), GetDefaultTxPowerLevel (), GetLongRetryCount (station), GetShortGuardInterval (station), Min (GetNumberOfReceiveAntennas (station),GetNumberOfTransmitAntennas()), GetNess (station), GetStbc (station)); } WifiTxVector AmrrWifiManager::DoGetRtsTxVector (WifiRemoteStation *st) @@ -330,7 +330,7 @@ AmrrWifiManager::DoGetRtsTxVector (WifiRemoteStation *st) AmrrWifiRemoteStation *station = (AmrrWifiRemoteStation *)st; UpdateMode (station); /// \todo can we implement something smarter ? - return WifiTxVector (GetSupported (station, 0), GetDefaultTxPowerLevel (), GetLongRetryCount (station), GetShortGuardInterval (station), Min (GetNumberOfReceiveAntennas (station),GetNumberOfTransmitAntennas()), GetNumberOfTransmitAntennas (station), GetStbc (station)); + return WifiTxVector (GetSupported (station, 0), GetDefaultTxPowerLevel (), GetLongRetryCount (station), GetShortGuardInterval (station), Min (GetNumberOfReceiveAntennas (station),GetNumberOfTransmitAntennas()), GetNess (station), GetStbc (station)); } diff --git a/src/wifi/model/arf-wifi-manager.cc b/src/wifi/model/arf-wifi-manager.cc index 6a2b4954a..d3b259d62 100644 --- a/src/wifi/model/arf-wifi-manager.cc +++ b/src/wifi/model/arf-wifi-manager.cc @@ -202,7 +202,7 @@ ArfWifiManager::DoGetDataTxVector (WifiRemoteStation *st, uint32_t size) { NS_LOG_FUNCTION (this << st << size); ArfWifiRemoteStation *station = (ArfWifiRemoteStation *) st; - return WifiTxVector (GetSupported (station, station->m_rate), GetDefaultTxPowerLevel (), GetLongRetryCount (station), GetShortGuardInterval (station), Min (GetNumberOfReceiveAntennas (station),GetNumberOfTransmitAntennas()), GetNumberOfTransmitAntennas (station), GetStbc (station)); + return WifiTxVector (GetSupported (station, station->m_rate), GetDefaultTxPowerLevel (), GetLongRetryCount (station), GetShortGuardInterval (station), Min (GetNumberOfReceiveAntennas (station),GetNumberOfTransmitAntennas()), GetNess (station), GetStbc (station)); } WifiTxVector ArfWifiManager::DoGetRtsTxVector (WifiRemoteStation *st) @@ -211,7 +211,7 @@ ArfWifiManager::DoGetRtsTxVector (WifiRemoteStation *st) /// \todo we could/should implement the Arf algorithm for /// RTS only by picking a single rate within the BasicRateSet. ArfWifiRemoteStation *station = (ArfWifiRemoteStation *) st; - return WifiTxVector (GetSupported (station, 0), GetDefaultTxPowerLevel (), GetLongRetryCount (station), GetShortGuardInterval (station), Min (GetNumberOfReceiveAntennas (station),GetNumberOfTransmitAntennas()), GetNumberOfTransmitAntennas (station), GetStbc (station)); + return WifiTxVector (GetSupported (station, 0), GetDefaultTxPowerLevel (), GetLongRetryCount (station), GetShortGuardInterval (station), Min (GetNumberOfReceiveAntennas (station),GetNumberOfTransmitAntennas()), GetNess (station), GetStbc (station)); } bool diff --git a/src/wifi/model/cara-wifi-manager.cc b/src/wifi/model/cara-wifi-manager.cc index db757223c..00fbcc6c4 100644 --- a/src/wifi/model/cara-wifi-manager.cc +++ b/src/wifi/model/cara-wifi-manager.cc @@ -176,7 +176,7 @@ CaraWifiManager::DoGetDataTxVector (WifiRemoteStation *st, { NS_LOG_FUNCTION (this << st << size); CaraWifiRemoteStation *station = (CaraWifiRemoteStation *) st; - return WifiTxVector (GetSupported (station, station->m_rate), GetDefaultTxPowerLevel (), GetLongRetryCount (station), GetShortGuardInterval (station), Min (GetNumberOfReceiveAntennas (station),GetNumberOfTransmitAntennas()), GetNumberOfTransmitAntennas (station), GetStbc (station)); + return WifiTxVector (GetSupported (station, station->m_rate), GetDefaultTxPowerLevel (), GetLongRetryCount (station), GetShortGuardInterval (station), Min (GetNumberOfReceiveAntennas (station),GetNumberOfTransmitAntennas()), GetNess (station), GetStbc (station)); } WifiTxVector CaraWifiManager::DoGetRtsTxVector (WifiRemoteStation *st) @@ -184,7 +184,7 @@ CaraWifiManager::DoGetRtsTxVector (WifiRemoteStation *st) NS_LOG_FUNCTION (this << st); /// \todo we could/should implement the Arf algorithm for /// RTS only by picking a single rate within the BasicRateSet. - return WifiTxVector (GetSupported (st, 0), GetDefaultTxPowerLevel (), GetLongRetryCount (st), GetShortGuardInterval (st), Min (GetNumberOfReceiveAntennas (st),GetNumberOfTransmitAntennas()), GetNumberOfTransmitAntennas (st), GetStbc (st)); + return WifiTxVector (GetSupported (st, 0), GetDefaultTxPowerLevel (), GetLongRetryCount (st), GetShortGuardInterval (st), Min (GetNumberOfReceiveAntennas (st),GetNumberOfTransmitAntennas()), GetNess (st), GetStbc (st)); } bool diff --git a/src/wifi/model/constant-rate-wifi-manager.cc b/src/wifi/model/constant-rate-wifi-manager.cc index e53c53636..d0788e5f9 100644 --- a/src/wifi/model/constant-rate-wifi-manager.cc +++ b/src/wifi/model/constant-rate-wifi-manager.cc @@ -112,13 +112,13 @@ WifiTxVector ConstantRateWifiManager::DoGetDataTxVector (WifiRemoteStation *st, uint32_t size) { NS_LOG_FUNCTION (this << st << size); - return WifiTxVector (m_dataMode, GetDefaultTxPowerLevel (), GetLongRetryCount (st), GetShortGuardInterval (st), Min (GetNumberOfReceiveAntennas (st),GetNumberOfTransmitAntennas()), GetNumberOfTransmitAntennas (st), GetStbc (st)); + return WifiTxVector (m_dataMode, GetDefaultTxPowerLevel (), GetLongRetryCount (st), GetShortGuardInterval (st), Min (GetNumberOfReceiveAntennas (st),GetNumberOfTransmitAntennas()), GetNess (st), GetStbc (st)); } WifiTxVector ConstantRateWifiManager::DoGetRtsTxVector (WifiRemoteStation *st) { NS_LOG_FUNCTION (this << st); - return WifiTxVector (m_ctlMode, GetDefaultTxPowerLevel (), GetShortRetryCount (st), GetShortGuardInterval (st), Min (GetNumberOfReceiveAntennas (st),GetNumberOfTransmitAntennas()), GetNumberOfTransmitAntennas (st), GetStbc (st)); + return WifiTxVector (m_ctlMode, GetDefaultTxPowerLevel (), GetShortRetryCount (st), GetShortGuardInterval (st), Min (GetNumberOfReceiveAntennas (st),GetNumberOfTransmitAntennas()), GetNess (st), GetStbc (st)); } bool diff --git a/src/wifi/model/ideal-wifi-manager.cc b/src/wifi/model/ideal-wifi-manager.cc index b4a540e39..e09efcab0 100644 --- a/src/wifi/model/ideal-wifi-manager.cc +++ b/src/wifi/model/ideal-wifi-manager.cc @@ -160,7 +160,7 @@ IdealWifiManager::DoGetDataTxVector (WifiRemoteStation *st, uint32_t size) maxMode = mode; } } - return WifiTxVector (maxMode, GetDefaultTxPowerLevel (), GetLongRetryCount (station), GetShortGuardInterval (station), Min (GetNumberOfReceiveAntennas (station),GetNumberOfTransmitAntennas()), GetNumberOfTransmitAntennas (station), GetStbc (station)); + return WifiTxVector (maxMode, GetDefaultTxPowerLevel (), GetLongRetryCount (station), GetShortGuardInterval (station), Min (GetNumberOfReceiveAntennas (station),GetNumberOfTransmitAntennas()), GetNess (station), GetStbc (station)); } WifiTxVector IdealWifiManager::DoGetRtsTxVector (WifiRemoteStation *st) @@ -182,7 +182,7 @@ IdealWifiManager::DoGetRtsTxVector (WifiRemoteStation *st) maxMode = mode; } } - return WifiTxVector (maxMode, GetDefaultTxPowerLevel (), GetShortRetryCount (station), GetShortGuardInterval (station), Min (GetNumberOfReceiveAntennas (station),GetNumberOfTransmitAntennas()), GetNumberOfTransmitAntennas (station), GetStbc (station)); + return WifiTxVector (maxMode, GetDefaultTxPowerLevel (), GetShortRetryCount (station), GetShortGuardInterval (station), Min (GetNumberOfReceiveAntennas (station),GetNumberOfTransmitAntennas()), GetNess (station), GetStbc (station)); } bool diff --git a/src/wifi/model/minstrel-wifi-manager.cc b/src/wifi/model/minstrel-wifi-manager.cc index e11d595b1..c01cb9821 100644 --- a/src/wifi/model/minstrel-wifi-manager.cc +++ b/src/wifi/model/minstrel-wifi-manager.cc @@ -482,7 +482,7 @@ MinstrelWifiManager::DoGetDataTxVector (WifiRemoteStation *st, station->m_txrate = m_nsupported / 2; } UpdateStats (station); - return WifiTxVector (GetSupported (station, station->m_txrate), GetDefaultTxPowerLevel (), GetLongRetryCount (station), GetShortGuardInterval (station), Min (GetNumberOfReceiveAntennas (station),GetNumberOfTransmitAntennas()), GetNumberOfTransmitAntennas (station), GetStbc (station)); + return WifiTxVector (GetSupported (station, station->m_txrate), GetDefaultTxPowerLevel (), GetLongRetryCount (station), GetShortGuardInterval (station), Min (GetNumberOfReceiveAntennas (station),GetNumberOfTransmitAntennas()), GetNess (station), GetStbc (station)); } WifiTxVector @@ -491,7 +491,7 @@ MinstrelWifiManager::DoGetRtsTxVector (WifiRemoteStation *st) MinstrelWifiRemoteStation *station = (MinstrelWifiRemoteStation *) st; NS_LOG_DEBUG ("DoGetRtsMode m_txrate=" << station->m_txrate); - return WifiTxVector (GetSupported (station, 0), GetDefaultTxPowerLevel (), GetShortRetryCount (station), GetShortGuardInterval (station), Min (GetNumberOfReceiveAntennas (station),GetNumberOfTransmitAntennas()), GetNumberOfTransmitAntennas (station), GetStbc (station)); + return WifiTxVector (GetSupported (station, 0), GetDefaultTxPowerLevel (), GetShortRetryCount (station), GetShortGuardInterval (station), Min (GetNumberOfReceiveAntennas (station),GetNumberOfTransmitAntennas()), GetNess (station), GetStbc (station)); } bool diff --git a/src/wifi/model/onoe-wifi-manager.cc b/src/wifi/model/onoe-wifi-manager.cc index 725abaa03..8c9559137 100644 --- a/src/wifi/model/onoe-wifi-manager.cc +++ b/src/wifi/model/onoe-wifi-manager.cc @@ -268,7 +268,7 @@ OnoeWifiManager::DoGetDataTxVector (WifiRemoteStation *st, rateIndex = station->m_txrate; } } - return WifiTxVector (GetSupported (station, rateIndex), GetDefaultTxPowerLevel (), GetLongRetryCount (station), GetShortGuardInterval (station), Min (GetNumberOfReceiveAntennas (station),GetNumberOfTransmitAntennas()), GetNumberOfTransmitAntennas (station), GetStbc (station)); + return WifiTxVector (GetSupported (station, rateIndex), GetDefaultTxPowerLevel (), GetLongRetryCount (station), GetShortGuardInterval (station), Min (GetNumberOfReceiveAntennas (station),GetNumberOfTransmitAntennas()), GetNess (station), GetStbc (station)); } WifiTxVector OnoeWifiManager::DoGetRtsTxVector (WifiRemoteStation *st) @@ -276,7 +276,7 @@ OnoeWifiManager::DoGetRtsTxVector (WifiRemoteStation *st) OnoeWifiRemoteStation *station = (OnoeWifiRemoteStation *)st; UpdateMode (station); /// \todo can we implement something smarter ? - return WifiTxVector (GetSupported (station, 0), GetDefaultTxPowerLevel (), GetShortRetryCount (station), GetShortGuardInterval (station), Min (GetNumberOfReceiveAntennas (station),GetNumberOfTransmitAntennas()), GetNumberOfTransmitAntennas (station), GetStbc (station)); + return WifiTxVector (GetSupported (station, 0), GetDefaultTxPowerLevel (), GetShortRetryCount (station), GetShortGuardInterval (station), Min (GetNumberOfReceiveAntennas (station),GetNumberOfTransmitAntennas()), GetNess (station), GetStbc (station)); } bool diff --git a/src/wifi/model/rraa-wifi-manager.cc b/src/wifi/model/rraa-wifi-manager.cc index c417e4c63..455935c91 100644 --- a/src/wifi/model/rraa-wifi-manager.cc +++ b/src/wifi/model/rraa-wifi-manager.cc @@ -284,12 +284,12 @@ RraaWifiManager::DoGetDataTxVector (WifiRemoteStation *st, { ResetCountersBasic (station); } - return WifiTxVector (GetSupported (station, station->m_rate), GetDefaultTxPowerLevel (), GetLongRetryCount (station), GetShortGuardInterval (station), Min (GetNumberOfReceiveAntennas (station),GetNumberOfTransmitAntennas()), GetNumberOfTransmitAntennas (station), GetStbc (station)); + return WifiTxVector (GetSupported (station, station->m_rate), GetDefaultTxPowerLevel (), GetLongRetryCount (station), GetShortGuardInterval (station), Min (GetNumberOfReceiveAntennas (station),GetNumberOfTransmitAntennas()), GetNess (station), GetStbc (station)); } WifiTxVector RraaWifiManager::DoGetRtsTxVector (WifiRemoteStation *st) { - return WifiTxVector (GetSupported (st, 0), GetDefaultTxPowerLevel (), GetShortRetryCount (st), GetShortGuardInterval (st), Min (GetNumberOfReceiveAntennas (st),GetNumberOfTransmitAntennas()), GetNumberOfTransmitAntennas (st), GetStbc (st)); + return WifiTxVector (GetSupported (st, 0), GetDefaultTxPowerLevel (), GetShortRetryCount (st), GetShortGuardInterval (st), Min (GetNumberOfReceiveAntennas (st),GetNumberOfTransmitAntennas()), GetNess (st), GetStbc (st)); } bool diff --git a/src/wifi/model/wifi-remote-station-manager.cc b/src/wifi/model/wifi-remote-station-manager.cc index 91bb566ab..9596fa122 100644 --- a/src/wifi/model/wifi-remote-station-manager.cc +++ b/src/wifi/model/wifi-remote-station-manager.cc @@ -1204,6 +1204,7 @@ WifiRemoteStationManager::LookupState (Mac48Address address) const state->m_greenfield=m_wifiPhy->GetGreenfield(); state->m_rx=1; state->m_tx=1; + state->m_ness=0; state->m_stbc=false; const_cast (this)->m_states.push_back (state); NS_LOG_DEBUG ("WifiRemoteStationManager::LookupState returning new state"); @@ -1415,6 +1416,11 @@ WifiRemoteStationManager::GetNumberOfTransmitAntennas (const WifiRemoteStation * return station->m_state->m_tx; } uint32_t +WifiRemoteStationManager::GetNess (const WifiRemoteStation *station) const +{ + return station->m_state->m_ness; +} +uint32_t WifiRemoteStationManager::GetShortRetryCount (const WifiRemoteStation *station) const { return station->m_ssrc; diff --git a/src/wifi/model/wifi-remote-station-manager.h b/src/wifi/model/wifi-remote-station-manager.h index 533362501..93660d87f 100644 --- a/src/wifi/model/wifi-remote-station-manager.h +++ b/src/wifi/model/wifi-remote-station-manager.h @@ -637,6 +637,13 @@ public: * \return the number of transmit antenna the station has */ uint32_t GetNumberOfTransmitAntennas (const WifiRemoteStation *station) const; + /** + * Return the Number of extension spatial streams (Ness) the station has. + * + * \param station the station being queried + * \return the number of Ness the station has + */ + uint32_t GetNess (const WifiRemoteStation *station) const; /** * Return the long retry limit of the given station. * @@ -999,6 +1006,7 @@ struct WifiRemoteStationState bool m_shortGuardInterval; //!< Flag if short guard interval is supported by the remote station uint32_t m_rx; //!< Number of RX antennas of the remote station uint32_t m_tx; //!< Number of TX antennas of the remote station + uint32_t m_ness; //!< Number of streams in beamforming of the remote station bool m_stbc; //!< Flag if STBC is used by the remote station bool m_greenfield; //!< Flag if green field is used by the remote station