24 #include "ns3/boolean.h" |
24 #include "ns3/boolean.h" |
25 #include "ns3/double.h" |
25 #include "ns3/double.h" |
26 #include "ns3/uinteger.h" |
26 #include "ns3/uinteger.h" |
27 #include "ns3/simulator.h" |
27 #include "ns3/simulator.h" |
28 |
28 |
|
29 #define Min(a,b) ((a < b) ? a : b) |
|
30 |
29 NS_LOG_COMPONENT_DEFINE ("RraaWifiManager"); |
31 NS_LOG_COMPONENT_DEFINE ("RraaWifiManager"); |
30 |
32 |
31 namespace ns3 { |
33 namespace ns3 { |
32 |
34 |
33 struct RraaWifiRemoteStation : public WifiRemoteStation |
35 struct RraaWifiRemoteStation : public WifiRemoteStation |
265 void |
267 void |
266 RraaWifiManager::DoReportFinalDataFailed (WifiRemoteStation *st) |
268 RraaWifiManager::DoReportFinalDataFailed (WifiRemoteStation *st) |
267 { |
269 { |
268 } |
270 } |
269 |
271 |
270 WifiMode |
272 WifiTxVector |
271 RraaWifiManager::DoGetDataMode (WifiRemoteStation *st, |
273 RraaWifiManager::DoGetDataTxVector (WifiRemoteStation *st, |
272 uint32_t size) |
274 uint32_t size) |
273 { |
275 { |
274 RraaWifiRemoteStation *station = (RraaWifiRemoteStation *) st; |
276 RraaWifiRemoteStation *station = (RraaWifiRemoteStation *) st; |
275 if (!station->m_initialized) |
277 if (!station->m_initialized) |
276 { |
278 { |
277 ResetCountersBasic (station); |
279 ResetCountersBasic (station); |
278 } |
280 } |
279 return GetSupported (station, station->m_rate); |
281 return WifiTxVector (GetSupported (station, station->m_rate), GetDefaultTxPowerLevel (), GetLongRetryCount (station), GetShortGuardInterval (station), Min (GetNumberOfReceiveAntennas (station),GetNumberOfTransmitAntennas()), GetNumberOfTransmitAntennas (station), GetStbc (station)); |
280 } |
282 } |
281 WifiMode |
283 WifiTxVector |
282 RraaWifiManager::DoGetRtsMode (WifiRemoteStation *st) |
284 RraaWifiManager::DoGetRtsTxVector (WifiRemoteStation *st) |
283 { |
285 { |
284 return GetSupported (st, 0); |
286 return WifiTxVector (GetSupported (st, 0), GetDefaultTxPowerLevel (), GetShortRetryCount (st), GetShortGuardInterval (st), Min (GetNumberOfReceiveAntennas (st),GetNumberOfTransmitAntennas()), GetNumberOfTransmitAntennas (st), GetStbc (st)); |
285 } |
287 } |
286 |
288 |
287 bool |
289 bool |
288 RraaWifiManager::DoNeedRts (WifiRemoteStation *st, |
290 RraaWifiManager::DoNeedRts (WifiRemoteStation *st, |
289 Ptr<const Packet> packet, bool normally) |
291 Ptr<const Packet> packet, bool normally) |