wifi: (fixes #2306): Raise DCF IsBusy () condition for CCA busy
This patch is reworked from a patch contributed by Ali Rostami <a.rostami@rutgers.edu>. This patch has been developed jointly at WINLAB, Rutgers University and West Virginia University as part of the V2V safety communications scalability activity of the Interoperability Issues of Vehicle-to-Vehicle Based Safety Systems (V2V-Interoperability) Project headed by the Crash Avoidance Metrics Partnership (CAMP) Vehicle Safety Communications 3 (VSC3) Consortium, in partnership with the United States Department of Transportation (USDOT).
This commit is contained in:
@@ -493,6 +493,12 @@ DcfManager::IsBusy (void) const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
// CCA busy
|
||||
Time lastCCABusyEnd = m_lastBusyStart + m_lastBusyDuration;
|
||||
if (lastCCABusyEnd > Simulator::Now ())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -529,7 +529,7 @@ private:
|
||||
void DoGrantAccess (void);
|
||||
/**
|
||||
* Check if the device is busy sending or receiving,
|
||||
* or NAV busy.
|
||||
* or NAV or CCA busy.
|
||||
*
|
||||
* \return true if the device is busy,
|
||||
* false otherwise
|
||||
|
||||
@@ -623,8 +623,8 @@ DcfManagerTest::DoRun (void)
|
||||
AddAccessRequest (21, 1, 24, 0);
|
||||
EndTest ();
|
||||
|
||||
// 20 40 50 53 54 55
|
||||
// | switching | busy | sifs | aifsn | tx |
|
||||
// 20 40 50 53 54 55 56 57
|
||||
// | switching | busy | sifs | aifsn | bslot0 | bslot 1 | tx |
|
||||
// | |
|
||||
// 30 busy. 45 access request.
|
||||
//
|
||||
@@ -632,7 +632,8 @@ DcfManagerTest::DoRun (void)
|
||||
AddDcfState (1);
|
||||
AddSwitchingEvt (20,20);
|
||||
AddCcaBusyEvt (30,20);
|
||||
AddAccessRequest (45, 1, 54, 0);
|
||||
ExpectCollision (45, 2, 0); //backoff: 2 slots
|
||||
AddAccessRequest (45, 1, 56, 0);
|
||||
EndTest ();
|
||||
|
||||
// 20 30 50 53 54 55
|
||||
|
||||
Reference in New Issue
Block a user