keep track of the state needed for a single DCF function. More...
#include <dcf-manager.h>
Public Member Functions | |
| void | SetAifsn (uint32_t aifsn) |
| void | ResetCw (void) |
| void | UpdateFailedCw (void) |
| void | StartBackoffNow (uint32_t nSlots) |
| uint32_t | GetCw (void) const |
| bool | IsAccessRequested (void) const |
Private Member Functions | |
| virtual void | DoNotifyAccessGranted (void)=0 |
| virtual void | DoNotifyInternalCollision (void)=0 |
| virtual void | DoNotifyCollision (void)=0 |
| virtual void | DoNotifyChannelSwitching ()=0 |
keep track of the state needed for a single DCF function.
Multiple instances of a DcfState can be registered in a single DcfManager to implement 802.11e-style relative QoS. DcfState::SetAifsn and DcfState::SetCwBounds allow the user to control the relative QoS differentiation.
| virtual void ns3::DcfState::DoNotifyAccessGranted | ( | void | ) | [private, pure virtual] |
Called by DcfManager to notify a DcfState subclass that access to the medium is granted and can start immediately.
| virtual void ns3::DcfState::DoNotifyChannelSwitching | ( | ) | [private, pure virtual] |
Called by DcfManager to notify a DcfState subclass that a channel switching occured.
The subclass is expected to flush the queue of packets.
| virtual void ns3::DcfState::DoNotifyCollision | ( | void | ) | [private, pure virtual] |
Called by DcfManager to notify a DcfState subclass that a normal collision occured, that is, that the medium was busy when access was requested.
The subclass is expected to start a new backoff by calling DcfState::StartBackoffNow and DcfManager::RequestAccess is access is still needed.
| virtual void ns3::DcfState::DoNotifyInternalCollision | ( | void | ) | [private, pure virtual] |
Called by DcfManager to notify a DcfState subclass that an 'internal' collision occured, that is, that the backoff timer of a higher priority DcfState expired at the same time and that access was granted to this higher priority DcfState.
The subclass is expected to start a new backoff by calling DcfState::StartBackoffNow and DcfManager::RequestAccess is access is still needed.
| uint32_t ns3::DcfState::GetCw | ( | void | ) | const |
| bool ns3::DcfState::IsAccessRequested | ( | void | ) | const |
| void ns3::DcfState::ResetCw | ( | void | ) |
Update the value of the CW variable to take into account a transmission success or a transmission abort (stop transmission of a packet after the maximum number of retransmissions has been reached). By default, this resets the CW variable to minCW.
| void ns3::DcfState::SetAifsn | ( | uint32_t | aifsn | ) |
| aifsn | the number of slots which make up an AIFS for a specific DCF. a DIFS corresponds to an AIFSN = 2. |
Calling this method after DcfManager::Add has been called is not recommended.
| void ns3::DcfState::StartBackoffNow | ( | uint32_t | nSlots | ) |
| nSlots | the number of slots of the backoff. |
Start a backoff by initializing the backoff counter to the number of slots specified.
| void ns3::DcfState::UpdateFailedCw | ( | void | ) |
Update the value of the CW variable to take into account a transmission failure. By default, this triggers a doubling of CW (capped by maxCW).
1.7.1