|
|
| 75 |
void ExpectCollision (uint64_t time, uint32_t from, uint32_t nSlots); |
75 |
void ExpectCollision (uint64_t time, uint32_t from, uint32_t nSlots); |
| 76 |
void AddRxOkEvt (uint64_t at, uint64_t duration); |
76 |
void AddRxOkEvt (uint64_t at, uint64_t duration); |
| 77 |
void AddRxErrorEvt (uint64_t at, uint64_t duration); |
77 |
void AddRxErrorEvt (uint64_t at, uint64_t duration); |
|
|
78 |
void AddRxInsideSifsEvt (uint64_t at, uint64_t duration); |
| 79 |
void AddTxEvt (uint64_t at, uint64_t duration); |
| 78 |
void AddNavReset (uint64_t at, uint64_t duration); |
80 |
void AddNavReset (uint64_t at, uint64_t duration); |
| 79 |
void AddNavStart (uint64_t at, uint64_t duration); |
81 |
void AddNavStart (uint64_t at, uint64_t duration); |
| 80 |
void AddAckTimeoutReset (uint64_t at); |
82 |
void AddAckTimeoutReset (uint64_t at); |
|
|
| 143 |
m_result = result; |
145 |
m_result = result; |
| 144 |
} |
146 |
} |
| 145 |
} |
147 |
} |
|
|
148 |
void |
| 149 |
DcfManagerTest::AddTxEvt (uint64_t at, uint64_t duration) |
| 150 |
{ |
| 151 |
Simulator::Schedule (MicroSeconds (at) - Now (), |
| 152 |
&DcfManager::NotifyTxStartNow, m_dcfManager, |
| 153 |
MicroSeconds (duration)); |
| 154 |
} |
| 146 |
void |
155 |
void |
| 147 |
DcfManagerTest::NotifyInternalCollision (uint32_t i) |
156 |
DcfManagerTest::NotifyInternalCollision (uint32_t i) |
| 148 |
{ |
157 |
{ |
|
|
| 244 |
Simulator::Schedule (MicroSeconds (at+duration) - Now (), |
253 |
Simulator::Schedule (MicroSeconds (at+duration) - Now (), |
| 245 |
&DcfManager::NotifyRxEndOkNow, m_dcfManager); |
254 |
&DcfManager::NotifyRxEndOkNow, m_dcfManager); |
| 246 |
} |
255 |
} |
|
|
256 |
void |
| 257 |
DcfManagerTest::AddRxInsideSifsEvt (uint64_t at, uint64_t duration) |
| 258 |
{ |
| 259 |
Simulator::Schedule (MicroSeconds (at) - Now (), |
| 260 |
&DcfManager::NotifyRxStartNow, m_dcfManager, |
| 261 |
MicroSeconds (duration)); |
| 262 |
} |
| 247 |
void |
263 |
void |
| 248 |
DcfManagerTest::AddRxErrorEvt (uint64_t at, uint64_t duration) |
264 |
DcfManagerTest::AddRxErrorEvt (uint64_t at, uint64_t duration) |
| 249 |
{ |
265 |
{ |
|
|
| 321 |
AddAccessRequest (1, 1, 4, 0); |
337 |
AddAccessRequest (1, 1, 4, 0); |
| 322 |
AddAccessRequest (10, 2, 10, 0); |
338 |
AddAccessRequest (10, 2, 10, 0); |
| 323 |
EndTest (); |
339 |
EndTest (); |
|
|
340 |
// Check that receiving inside SIFS shall be cancelled properly: |
| 341 |
// 0 3 4 5 8 9 12 13 14 |
| 342 |
// | sifs | aifsn | tx | sifs | ack | sifs | aifsn | |tx | |
| 343 |
// |
| 344 |
StartTest (1, 3, 10); |
| 345 |
AddDcfState (1); |
| 346 |
AddAccessRequest (1, 1, 4, 0); |
| 347 |
AddRxInsideSifsEvt (6, 10); |
| 348 |
AddTxEvt(8, 1); |
| 349 |
AddAccessRequest (14, 2, 14, 0); |
| 350 |
EndTest (); |
| 351 |
|
| 324 |
|
352 |
|
| 325 |
// The test below mainly intends to test the case where the medium |
353 |
// The test below mainly intends to test the case where the medium |
| 326 |
// becomes busy in the middle of a backoff slot: the backoff counter |
354 |
// becomes busy in the middle of a backoff slot: the backoff counter |