|
|
| 41 |
|
41 |
|
| 42 |
DcfState::DcfState () |
42 |
DcfState::DcfState () |
| 43 |
: m_backoffSlots (0), |
43 |
: m_backoffSlots (0), |
| 44 |
m_backoffStart (Seconds (0.0)), |
44 |
m_backoffStart (Seconds (-1.0)), |
| 45 |
m_cwMin (0), |
45 |
m_cwMin (0), |
| 46 |
m_cwMax (0), |
46 |
m_cwMax (0), |
| 47 |
m_cw (0), |
47 |
m_cw (0), |
|
|
| 208 |
****************************************************************/ |
208 |
****************************************************************/ |
| 209 |
|
209 |
|
| 210 |
DcfManager::DcfManager () |
210 |
DcfManager::DcfManager () |
| 211 |
: m_lastNavStart (MicroSeconds (0)), |
211 |
: m_lastNavStart (Seconds (-1.0)), |
| 212 |
m_lastNavDuration (MicroSeconds (0)), |
212 |
m_lastNavDuration (Seconds (0.0)), |
| 213 |
m_lastRxStart (MicroSeconds (0)), |
213 |
m_lastRxStart (Seconds (-1.0)), |
| 214 |
m_lastRxDuration (MicroSeconds (0)), |
214 |
m_lastRxDuration (Seconds (0.0)), |
| 215 |
m_lastRxReceivedOk (true), |
215 |
m_lastRxReceivedOk (true), |
| 216 |
m_lastRxEnd (MicroSeconds (0)), |
216 |
m_lastRxEnd (Seconds (-1.0)), |
| 217 |
m_lastTxStart (MicroSeconds (0)), |
217 |
m_lastTxStart (Seconds (-1.0)), |
| 218 |
m_lastTxDuration (MicroSeconds (0)), |
218 |
m_lastTxDuration (Seconds (0.0)), |
| 219 |
m_lastBusyStart (MicroSeconds (0)), |
219 |
m_lastBusyStart (Seconds (-1.0)), |
| 220 |
m_lastBusyDuration (MicroSeconds (0)), |
220 |
m_lastBusyDuration (Seconds (0.0)), |
| 221 |
m_rxing (false), |
221 |
m_rxing (false), |
| 222 |
m_slotTime (Seconds (0.0)), |
222 |
m_slotTime (Seconds (0.0)), |
| 223 |
m_sifs (Seconds (0.0)), |
223 |
m_sifs (Seconds (0.0)), |
|
Lines 323-330
DcfManager::RequestAccess (DcfState *sta
|
Link Here
|
|---|
|
| 323 |
* If there is a collision, generate a backoff |
323 |
* If there is a collision, generate a backoff |
| 324 |
* by notifying the collision to the user. |
324 |
* by notifying the collision to the user. |
| 325 |
*/ |
325 |
*/ |
| 326 |
if (state->GetBackoffSlots () == 0 && |
326 |
if (GetBackoffEndFor (state) < Simulator::Now () && IsBusy ()) |
| 327 |
IsBusy ()) |
|
|
| 328 |
{ |
327 |
{ |
| 329 |
MY_DEBUG ("medium is busy: collision"); |
328 |
MY_DEBUG ("medium is busy: collision"); |
| 330 |
/* someone else has accessed the medium. |
329 |
/* someone else has accessed the medium. |