Contention

Package: inet.linklayer.ieee80211.mac.contention

Contention

simple module

The default implementation of IContention.

Inheritance diagram

The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.

Parameters

Name Type Default value Description
initialChannelBusy bool true

assume that channel was busy before the simulation started

backoffOptimization bool true

we can pretend the frame has arrived into the queue a little bit earlier, and may be able to start transmitting immediately

Properties

Name Value Description
display i=block/timer
defaultStatistic stateChanged:vector

Signals

Name Type Unit
channelAccessGranted
backoffStarted simtime_t
backoffStopped simtime_t
backoffPeriodGenerated long
stateChanged long

Statistics

Name Title Source Record Unit Interpolation Mode
backoffActive backoff active warmup(count(backoffStarted)-count(backoffStopped)) vector sample-hold
channelAccessGranted channel access granted count, vector?
backoffPeriodGenerated backoff periods vector none
stateChanged contention state changed count, vector none

Scheduled messages (observed)

msgkindctrltagsmsgnamecontext
omnetpp::cMessage0channelGranted
omnetpp::cMessage0startTx

Direct method calls (observed)

call tofunctioninfo
Ieee80211Interfaceinet::NetworkInterface::receiveSignalPOST_MODEL_CHANGE
Dcafinet::ieee80211::Dcaf::channelAccessGrantedchannelAccessGranted
Edcafinet::ieee80211::Edcaf::channelAccessGrantedchannelAccessGranted

Called methods (observed)

functioninfocall from
inet::ieee80211::Contention::corruptedFrameReceivedcorruptedFrameReceivedRx
inet::ieee80211::Contention::mediumStateChangedmedium BUSYRx, Dcaf
inet::ieee80211::Contention::mediumStateChangedmedium FREERx, Dcaf, Edcaf
inet::ieee80211::Contention::startContentionstartContentionDcaf, Edcaf

Source code

//
// The default implementation of IContention.
//
simple Contention like IContention
{
    parameters:
        bool initialChannelBusy = default(true); // assume that channel was busy before the simulation started
        bool backoffOptimization = default(true);    // we can pretend the frame has arrived into the queue a little bit earlier, and may be able to start transmitting immediately
        @display("i=block/timer");
        @signal[backoffPeriodGenerated](type=long);
        @signal[backoffStarted](type=simtime_t);
        @signal[backoffStopped](type=simtime_t);
        @signal[channelAccessGranted];
        @signal[stateChanged](type=long; enum=inet::ieee80211::Contention::State);
        @statistic[backoffPeriodGenerated](title="backoff periods"; record=vector; interpolationmode=none);
        @statistic[backoffActive](title="backoff active"; source=warmup(count(backoffStarted)-count(backoffStopped)); record=vector; interpolationmode=sample-hold; autoWarmupFilter=false);
        @statistic[channelAccessGranted](title="channel access granted"; record=count,vector?);
        @statistic[stateChanged](title="contention state changed"; type=enum; enum=IDLE,DEFER,IFS_AND_BACKOFF; record=count,vector; interpolationmode=none);
        @defaultStatistic(stateChanged:vector);
}

File: src/inet/linklayer/ieee80211/mac/contention/Contention.ned