Hi all,
For dcf backoff, according to wifi standard,
"If the medium is determined to be busy at any time during a backoff slot, then the backoff procedure is
suspended; that is, the backoff timer shall not decrement for that slot. The medium shall be determined to be
idle for the duration of a DIFS period or EIFS, as appropriate (see 9.3.2.3), before the backoff procedure is
allowed to resume".
but in ns-3, it seems no suspense in backoff when the channel is busy, slots are always decreased. do I misunderstand that ?
void
DcfManager::RequestAccess (DcfState *state)
{
NS_LOG_FUNCTION (this << state);
//Deny access if in sleep mode
if (m_sleeping)
{
return;
}
UpdateBackoff ();
NS_ASSERT (!state->IsAccessRequested ());
state->NotifyAccessRequested ();
/**
* If there is a collision, generate a backoff
* by notifying the collision to the user.
*/
if (state->GetBackoffSlots () == 0
&& IsBusy ())
{
MY_DEBUG ("medium is busy: collision");
/* someone else has accessed the medium.
* generate a backoff.
*/
state->NotifyCollision ();
}
DoGrantAccess ();
DoRestartAccessTimeoutIfNeeded ();
}
Hi,I realised i may misunderstand the code,DcfManager::GetAccessGrantStart (void) const which is called by UpdateBackoff () seems consider the situation when channel is busy with " Time busyAccessStart = m_lastBusyStart + m_lastBusyDuration + m_sifs;"
Time
DcfManager::GetAccessGrantStart (void) const
{
NS_LOG_FUNCTION (this);
Time rxAccessStart;
if (!m_rxing)
{
rxAccessStart = m_lastRxEnd + m_sifs;
if (!m_lastRxReceivedOk)
{
rxAccessStart += m_eifsNoDifs;
}
}
else
{
rxAccessStart = m_lastRxStart + m_lastRxDuration + m_sifs;
}
Time busyAccessStart = m_lastBusyStart + m_lastBusyDuration + m_sifs;
Time txAccessStart = m_lastTxStart + m_lastTxDuration + m_sifs;
Time navAccessStart = m_lastNavStart + m_lastNavDuration + m_sifs;
Time ackTimeoutAccessStart = m_lastAckTimeoutEnd + m_sifs;
Time ctsTimeoutAccessStart = m_lastCtsTimeoutEnd + m_sifs;
Time switchingAccessStart = m_lastSwitchingStart + m_lastSwitchingDuration + m_sifs;
Time accessGrantedStart = MostRecent (rxAccessStart,
busyAccessStart,
txAccessStart,
navAccessStart,
ackTimeoutAccessStart,
ctsTimeoutAccessStart,
switchingAccessStart
);
NS_LOG_INFO ("access grant start=" << accessGrantedStart <<
", rx access start=" << rxAccessStart <<
", busy access start=" << busyAccessStart <<
", tx access start=" << txAccessStart <<
", nav access start=" << navAccessStart);
return accessGrantedStart;
}
hope i understand correctly this time.
Kind regards,
Le Tian
Modeling of Systems and Internet Communication (MOSAIC)
University of Antwerp - iMinds
Dept. Mathematics and Computer Science
Middelheimlaan 1
2020 Antwerpen - BelgiumEmail: Le....@uantwerpen.be
--
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/Yo7HBXWT4U4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.