89 station->m_tx_retr = 0; |
89 station->m_tx_retr = 0; |
90 station->m_tx_upper = 0; |
90 station->m_tx_upper = 0; |
91 station->m_txrate = 0; |
91 station->m_txrate = 0; |
92 return station; |
92 return station; |
93 } |
93 } |
|
94 |
94 void |
95 void |
95 OnoeWifiManager::DoReportRxOk (WifiRemoteStation *station, |
96 OnoeWifiManager::DoReportRxOk (WifiRemoteStation *station, |
96 double rxSnr, WifiMode txMode) |
97 double rxSnr, WifiMode txMode) |
97 { |
98 { |
98 } |
99 } |
|
100 |
99 void |
101 void |
100 OnoeWifiManager::DoReportRtsFailed (WifiRemoteStation *st) |
102 OnoeWifiManager::DoReportRtsFailed (WifiRemoteStation *st) |
101 { |
103 { |
102 OnoeWifiRemoteStation *station = (OnoeWifiRemoteStation *)st; |
104 OnoeWifiRemoteStation *station = (OnoeWifiRemoteStation *)st; |
103 station->m_shortRetry++; |
105 station->m_shortRetry++; |
104 } |
106 } |
|
107 |
105 void |
108 void |
106 OnoeWifiManager::DoReportDataFailed (WifiRemoteStation *st) |
109 OnoeWifiManager::DoReportDataFailed (WifiRemoteStation *st) |
107 { |
110 { |
108 OnoeWifiRemoteStation *station = (OnoeWifiRemoteStation *)st; |
111 OnoeWifiRemoteStation *station = (OnoeWifiRemoteStation *)st; |
109 station->m_longRetry++; |
112 station->m_longRetry++; |
110 } |
113 } |
|
114 |
111 void |
115 void |
112 OnoeWifiManager::DoReportRtsOk (WifiRemoteStation *station, |
116 OnoeWifiManager::DoReportRtsOk (WifiRemoteStation *station, |
113 double ctsSnr, WifiMode ctsMode, double rtsSnr) |
117 double ctsSnr, WifiMode ctsMode, double rtsSnr) |
114 { |
118 { |
115 } |
119 } |
|
120 |
116 void |
121 void |
117 OnoeWifiManager::DoReportDataOk (WifiRemoteStation *st, |
122 OnoeWifiManager::DoReportDataOk (WifiRemoteStation *st, |
118 double ackSnr, WifiMode ackMode, double dataSnr) |
123 double ackSnr, WifiMode ackMode, double dataSnr) |
119 { |
124 { |
120 OnoeWifiRemoteStation *station = (OnoeWifiRemoteStation *)st; |
125 OnoeWifiRemoteStation *station = (OnoeWifiRemoteStation *)st; |
121 UpdateRetry (station); |
126 UpdateRetry (station); |
122 station->m_tx_ok++; |
127 station->m_tx_ok++; |
123 } |
128 } |
|
129 |
124 void |
130 void |
125 OnoeWifiManager::DoReportFinalRtsFailed (WifiRemoteStation *st) |
131 OnoeWifiManager::DoReportFinalRtsFailed (WifiRemoteStation *st) |
126 { |
132 { |
127 OnoeWifiRemoteStation *station = (OnoeWifiRemoteStation *)st; |
133 OnoeWifiRemoteStation *station = (OnoeWifiRemoteStation *)st; |
128 UpdateRetry (station); |
134 UpdateRetry (station); |
129 station->m_tx_err++; |
135 station->m_tx_err++; |
130 } |
136 } |
|
137 |
131 void |
138 void |
132 OnoeWifiManager::DoReportFinalDataFailed (WifiRemoteStation *st) |
139 OnoeWifiManager::DoReportFinalDataFailed (WifiRemoteStation *st) |
133 { |
140 { |
134 OnoeWifiRemoteStation *station = (OnoeWifiRemoteStation *)st; |
141 OnoeWifiRemoteStation *station = (OnoeWifiRemoteStation *)st; |
135 UpdateRetry (station); |
142 UpdateRetry (station); |
136 station->m_tx_err++; |
143 station->m_tx_err++; |
137 } |
144 } |
|
145 |
138 void |
146 void |
139 OnoeWifiManager::UpdateRetry (OnoeWifiRemoteStation *station) |
147 OnoeWifiManager::UpdateRetry (OnoeWifiRemoteStation *station) |
140 { |
148 { |
141 station->m_tx_retr += station->m_shortRetry + station->m_longRetry; |
149 station->m_tx_retr += station->m_shortRetry + station->m_longRetry; |
142 station->m_shortRetry = 0; |
150 station->m_shortRetry = 0; |
143 station->m_longRetry = 0; |
151 station->m_longRetry = 0; |
144 } |
152 } |
|
153 |
145 void |
154 void |
146 OnoeWifiManager::UpdateMode (OnoeWifiRemoteStation *station) |
155 OnoeWifiManager::UpdateMode (OnoeWifiRemoteStation *station) |
147 { |
156 { |
148 if (Simulator::Now () < station->m_nextModeUpdate) |
157 if (Simulator::Now () < station->m_nextModeUpdate) |
149 { |
158 { |
267 else |
276 else |
268 { |
277 { |
269 rateIndex = station->m_txrate; |
278 rateIndex = station->m_txrate; |
270 } |
279 } |
271 } |
280 } |
272 return WifiTxVector (GetSupported (station, rateIndex), GetDefaultTxPowerLevel (), GetLongRetryCount (station), GetShortGuardInterval (station), Min (GetNumberOfReceiveAntennas (station),GetNumberOfTransmitAntennas()), GetNess (station), GetStbc (station)); |
281 return WifiTxVector (GetSupported (station, rateIndex), GetDefaultTxPowerLevel (), GetLongRetryCount (station), GetShortGuardInterval (station), Min (GetNumberOfReceiveAntennas (station), GetNumberOfTransmitAntennas ()), GetNess (station), GetStbc (station)); |
273 } |
282 } |
|
283 |
274 WifiTxVector |
284 WifiTxVector |
275 OnoeWifiManager::DoGetRtsTxVector (WifiRemoteStation *st) |
285 OnoeWifiManager::DoGetRtsTxVector (WifiRemoteStation *st) |
276 { |
286 { |
277 OnoeWifiRemoteStation *station = (OnoeWifiRemoteStation *)st; |
287 OnoeWifiRemoteStation *station = (OnoeWifiRemoteStation *)st; |
278 UpdateMode (station); |
288 UpdateMode (station); |
279 /// \todo can we implement something smarter ? |
289 /// \todo can we implement something smarter ? |
280 return WifiTxVector (GetSupported (station, 0), GetDefaultTxPowerLevel (), GetShortRetryCount (station), GetShortGuardInterval (station), Min (GetNumberOfReceiveAntennas (station),GetNumberOfTransmitAntennas()), GetNess (station), GetStbc (station)); |
290 return WifiTxVector (GetSupported (station, 0), GetDefaultTxPowerLevel (), GetShortRetryCount (station), GetShortGuardInterval (station), Min (GetNumberOfReceiveAntennas (station), GetNumberOfTransmitAntennas ()), GetNess (station), GetStbc (station)); |
281 } |
291 } |
282 |
292 |
283 bool |
293 bool |
284 OnoeWifiManager::IsLowLatency (void) const |
294 OnoeWifiManager::IsLowLatency (void) const |
285 { |
295 { |
286 return false; |
296 return false; |
287 } |
297 } |
288 |
298 |
289 } // namespace ns3 |
299 } //namespace ns3 |